Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture in a subreport

Status
Not open for further replies.

eli13

Programmer
Jan 20, 2010
18
PH
Hello,
I was wondering how to put a picture in a sub-report from a database. i try some luck but it didn't work, and it only appears in the main report. Can you help me, please,

example:
i have a main report and a sub-report. but the picture should be shown in the sub-report. the picture is from the database.

Thank you!
 
you should be able to insert the image/field.
for example.

I have a 2 tables, client and pix that share the value ID1, and the pictures are named as ID1+.jpg.

Create and insert the subreport into the main report.
Link using ID1 (client.ID1=pix.ID1)

Use selection criteria in the 'pix' subreport to select just the image from the database that is wanted (ie: pix.picname=client.CID&".jpg")

Now when i refresh the main report, the image displays in the subreport showing the client selected for the main report.


 
can you give me an example of what you are saying?,
 
also the picture is only a path, so i have problem showing it, do you have any idea, if i put the objectpicture in the main report it shows, but if i put it in the subreport thats when it doesn't show at all.
 
First, is the picture in the database or stored as a independent file?

If it is an independent file, insert the picture, then right click and choose Format Picture, click on the the Picture tab, click on the x+2 next to Graphic Location and type in the location of your picture. to follow my previous example but with a file instead of a database field, I would type something like:

"P:\Files for Reports\Pictures\"&{CLIENT.ID1}&".jpg"

now for each client it will display the image from that directory which corresponds to the client's ID1.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top