display wrong photo on reports

peggypph

Registered User.
Local time
Tomorrow, 04:41
Joined
Jan 2, 2004
Messages
33
I create a simple product catelogue report which show the the product code and its picture . In my product database, there are fields of product code and photo's path & file name [mat_pic]. In the report's detail section, on format
if not isnull(mat_pic) then
image10.picture=mat_pic
else
image10.picture=""
endif

It works fine when field [mat_pic] has information for each product code.
But some product code may not have pictures, so there is nothing put into mat_pic field. The report displays every product code with a photo. For those products without photo will show up the latest displayed photo (i.e wrong photo). How can I eliminate this "confused" print out?

Thanks

Regards,
Peggy
 
Try your code this way instead (just these 2 lines in the On Format Event):
Code:
image10.picture = Nz(mat_pic)
image10.visible = Not IsNull(mat_pic)
 
Thanks, it works
 

Users who are viewing this thread

Back
Top Bottom