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
 
You just have to create formula that returns the path to the image

For example

If {?Who} = "CB" THEN "C:\pix\CBSig.JPG"
Else "C:\pix\MRSig.JPG"

k.
 

In your report, you can try creating a formula (Formula name example: IMG):

D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\ + {doc_file.df_filename}

Close the formula
Then insert your dummy photo
Right Click and edit the photo
Choose Picture
Choose the Picture location (formula button) and enter: @IMG

That worked for me. Maybe it will work for you.
 
It might be:
D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\Place Holder Image for Image Capture.jpg + {doc_file.df_filename}

Sorry. Maybe one of those will work for you.
 
Thanks Kim296,

Here is what ultimately worked for me:
In the "Graphic Location" formula box, I used the following:

"\\server name\folder name\" & {doc_file.df_filename}



Stephen
 
Hi Kim296,

I do have another question in regards to resizing the images so they fit on one page instead of getting cut and going to the next page.
Currently my (.jpg image files) are being displayed on two pages due to their large size.


Is there a script that would auto-fit the images to constrain them to one page?





Thanks
Stephen
 
Can you resize them by the drag and pull method or Format the Picture and change the width and height and Choose Not to Grow? Let me know if that works. I'm still learning myself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top