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!

Reporting images in Crystal Reports 2008

Status
Not open for further replies.

yosteevo

IS-IT--Management
May 8, 2012
42
US

For those of you who know how to replace an image with a different image within Crystal Reports, Please Help!!!


I am creating a report that will pull image files such PDF files etc. into the main report.

So far, I have imported an image placeholder that is located on my local server.
Its location will never change.

The image location is:
D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\Place Holder Image for Image Capture.jpg

The database field that retrieves this file path is: {doc_file.df_filename}

{doc_file.df_filename} will link to the image that I will want to have on the main report each time it is run. This image will always be different as well.

I am attempting to use the "Graphic Location" formula box to write a formula that will replace the (Place Holder Image for Image Capture.jpg) with the image that is linked to my database field: {doc_file.df_filename}.



I greatly appreciate any help on this matter!!!


Stephen

 
Look up 'OLE' (Object Linking and Embedding). This lets you choose between images.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Hi Madawc,
Thanks for the reply.


I am familiar with OLE Objects and how to import MS Word, Excel, and/or image files into a report.

My goal is to have a "Placeholder image" that will be replaced by what my database will be feeding it each time. (This should be possible by a writing a formula that replaced the initial image that was manually imported into the report)

I have a LIMS database that will be sending this (subreport) different image files all the time.


Thanks
Stephen

 
create a formula something like this:

IF isnull({doc_file.df_filename})
THEN "D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\Place Holder Image for Image Capture.jpg"
else {doc_file.df_filename}


if the database field value is null, it will display the 'default' image.
if the database field has a value, it uses that value as the file location to display the image.
 
Hello fisheromacse,

I have tried that formula already in the "Graphic Location" formula section from the properties of the "placeholder" image I imported into the report.
No luck yet.

My placeholder image still does not update with what the database is sending to the subreport.


Stephen
 
Ensure that whereever/whoever you are running the crystal report under has permissions. You may want to use fully qulified path instead of a drive letter as well.

Hope this helps,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top