Print Page | Close Window

Reporting images in Crystal Reports 2008

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16971
Printed Date: 18 May 2024 at 2:21am


Topic: Reporting images in Crystal Reports 2008
Posted By: Yosteevo777
Subject: Reporting images in Crystal Reports 2008
Date Posted: 05 Jul 2012 at 1:54pm
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


-------------
Stephen Waichulis
LIMS Database Administrator



Replies:
Posted By: hilfy
Date Posted: 06 Jul 2012 at 5:05am
You could try something like this:
 
if IsNull({doc_file.df_filename}) then
'D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\' + {doc_file.df_filename}
else
D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\Place Holder Image for Image Capture.jpg
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Yosteevo777
Date Posted: 06 Jul 2012 at 7:55am
Hi Dell,

Thank you for your reply.

I did try the formula and I am still having trouble getting my placeholder image to update or to be replaced with the image file that my database is feeding my subreport.


Perhaps there is another way to pull images, PDFs, Word/Excel files from a database to appear in a report?


Stephen




-------------
Stephen Waichulis
LIMS Database Administrator


Posted By: hilfy
Date Posted: 06 Jul 2012 at 8:42am
Which version of Crystal are you using?
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Yosteevo777
Date Posted: 06 Jul 2012 at 9:08am
Crystal Reports 2008

-------------
Stephen Waichulis
LIMS Database Administrator


Posted By: hilfy
Date Posted: 06 Jul 2012 at 11:13am
Would you please post the exact formula that you're using to set the picture location?
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Yosteevo777
Date Posted: 06 Jul 2012 at 12:01pm
If IsNull({doc_file.df_filename})
Then
'D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\Place Holder Image for Image Capture.jpg'
Else
'D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\ + {doc_file.df_filename}'



-------------
Stephen Waichulis
LIMS Database Administrator


Posted By: hilfy
Date Posted: 09 Jul 2012 at 8:33am
Have you checked in the field doc_fil.df_filename to see whether it has data in it?  If you're running this from a web app, the web application server needs to have access to this folder.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Yosteevo777
Date Posted: 11 Jul 2012 at 7:28am
Thanks hilfy,

All of our end users will be within our company's closed network.
The folder that contains the files that are read by Crystal Reports through the database field {doc_file.df_filename} is a shared folder located on one of our department's local servers. All users have read/write privileges to the folder.

I'm assuming my issue is related to my syntax being incorrect that I'm using within Crystal Reports. I have tried my formula in both the Graphic Location formula box as well as the Hyperlink information formula box.

I even tried local files on my desktop and my formula still did not replace the OLE placeholder graphical image.


-------------
Stephen Waichulis
LIMS Database Administrator



Print Page | Close Window