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!

how to load image path as actual image in report dynamically 2

Status
Not open for further replies.

mariabenita

Programmer
Jun 18, 2001
13
0
0
SG
cant put images in report
 
So Ken what your saying here is that if you have an image at the top of a report, say 100 reports all with the same image, and I want to change the image on all of the reports so i would like to referance the image on the database or on the hard drive doesnt matter can crystal do this or do i have to change the reports in all 100 places.

Any help would be good

Thanks

Craig
 
Is this is the same question?

In the scenario you have outlined you could have all of the reports point to a fixed path/file (stored with each report) and then replace the image file with another of the same name in the same location.

To do this you need to insert an OLE Object, select 'Create from File' and check off "LINK".

Crystal does not allow a report to read a path from a table, and display the image. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Ken

I tried youre suggestion and it didnt seem to work all it did was place the logo icon on the report, and when the report was displayed it showed the logo icon thats all its a .jpg file if thats any help.

Thanks

Craig
 
Hi Craig,

I actually had to do the same thing you were asking about (logos on reports), but for me I have about 6 different clients with different logos. What i did to fix this is the following:

1. Created a table in my access database called Logo, which comprised of one record with a number field (which will only be 1)and a logo field, which holds an OLE Object.

2. Added my logos to the logo field by right clicking on the field>selecting 'InsertOjbect'>CreateFromFile>and then navigating to my logo. You only have to do this once, and its stored in the db.

3. In my report, I created a subreport that only holds the logo field in the details section (so the logo will show) and in my select expert, I just set it to select where the autonumber field = 1. I put this subreport onto my report and voila! No fixing reports over again!

Now here's the drawback: the report needs access to that logo table to be able to display it, but if you bundle it with your db that the rest of the report is using, it shouldn't be a problem.

If you've got any other questions let me know.

Talk later,
Jack
 
Don't check "display as Icon".
Check off "Link" (which only appears when you select the radio button for "create from file". Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Ok, guys, I found a workaround!
I'm using Data report which is built in VB 6.

Just put a picture or image control in your VB app and then load dynamically image into it (the one you wish to dynamically display in your reports and then call:

Code:
Private Sub DataReport_Initialize()
Set rptPonuda.Sections(2).Controls(1).Picture = frmMain.Image1.Picture
End Sub

Works for me. I guess you could call this from some other place, but this is how I do it because it's enough for me.

Take care,
Hrvoje
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top