baytowel
asked on
Inserting Dynamic Images in to a Crystal Report 10
I am trying to insert dynamic pictures into my report from repository, by getting the path for the picture from database fields. The version that I am using is Crystal Reports 10.
Here is what I have done.
I inserted an OLE object into the report, went to "Format Graphics" by right clicking on the OLE object, then to "Hyperlink" Tab (as I didn't see anything other than "Reset" button and picture dimension options under the "Picture" tab), and selected "File" Radio button (as I didn't want to display the picture as Hyperlink) and gave the @Filepath as the formula there. @Filepath is the formula that gives me the complete path for the JPG that I need to insert in the report.
I am not able to see the image in the report "Preview" section as it is showing it has an empty box and when I click on that empty OLE object, I am able to view the image in a separate window where as my requirement is to view the image within the report (not in a separate window).
I didn't find anything useful under Format Graphics -> Picture tab.
I appreciate any kind of help from you all.
Thanks!
Here is what I have done.
I inserted an OLE object into the report, went to "Format Graphics" by right clicking on the OLE object, then to "Hyperlink" Tab (as I didn't see anything other than "Reset" button and picture dimension options under the "Picture" tab), and selected "File" Radio button (as I didn't want to display the picture as Hyperlink) and gave the @Filepath as the formula there. @Filepath is the formula that gives me the complete path for the JPG that I need to insert in the report.
I am not able to see the image in the report "Preview" section as it is showing it has an empty box and when I click on that empty OLE object, I am able to view the image in a separate window where as my requirement is to view the image within the report (not in a separate window).
I didn't find anything useful under Format Graphics -> Picture tab.
I appreciate any kind of help from you all.
Thanks!
ASKER
10 does not offer an X2 for a graphic location on the picture tab.
The only X2 I can set is for a file location on the hyperlink tab, which I have set to {@TLinktoPickture} which is formula field set to '\\btll\c$\inetpub\wwwroot \' + {BT_O_Workorder_Temp_ItemL evel.Linkt oPicture}
I have displayed this field on my report t displays the correct path.
If I click on myOle object when the report is displayed, it displays the correct jpg file in the windows viewer, but I need to be able to email the report as a pdf with the image included so this option does not work.
The only X2 I can set is for a file location on the hyperlink tab, which I have set to {@TLinktoPickture} which is formula field set to '\\btll\c$\inetpub\wwwroot
I have displayed this field on my report t displays the correct path.
If I click on myOle object when the report is displayed, it displays the correct jpg file in the windows viewer, but I need to be able to email the report as a pdf with the image included so this option does not work.
That's too bad - it is possible the dynamic image display wasn't available until a later version.
If there are only a few images to display, you could stack them all on top of each other and conditionally show/suppress them based on that field value.
Obviously, not an ideal solution if you have hundreds of possible options, but if it were something like a few company logos, this might be the best bet.
If there are only a few images to display, you could stack them all on top of each other and conditionally show/suppress them based on that field value.
Obviously, not an ideal solution if you have hundreds of possible options, but if it were something like a few company logos, this might be the best bet.
ASKER
dealing with hundreds of images....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
CR XI (v11) added the "dynamic" picture capability.
There is a way to do it in earlier versions but I don't recall what it is as I never had to use it.
mlmcc
There is a way to do it in earlier versions but I don't recall what it is as I never had to use it.
mlmcc
I've never used pictures in my reports, but CR 10 does (apparently) support BLOB fields, so one option might be to put the pictures in a db table and get them in the report that way.
James
James
ASKER
can i add an image stream dynamically to my data source to hold the image in memory rather than in the database as the db table would be quite large to store all the jpegs?
Sorry. I really don't know, since I've never used anything like that. Hopefully someone else will have an answer.
James
James
I then right click and choose Format Graphic and on the PICTURE tab, there is an X2 for "Graphic Location" down at the bottom. This is where I would add in the field that contains the \\filepath\ location.
I haven't used 10 in a while, so I'm not sure if this will work exactly as you need, but give it a try.