Print Page | Close Window

How to display Display dynamic Image?

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=11583
Printed Date: 02 May 2024 at 1:09am


Topic: How to display Display dynamic Image?
Posted By: Shivacon
Subject: How to display Display dynamic Image?
Date Posted: 02 Nov 2010 at 7:36pm
Hi All,

I have a requirement to show the image file from local directory dynamically. I have a file path to find the image from local machine for each row from table. Please help me that how to show the image in report by using the path?

-------------
Thanks,
Shiva



Replies:
Posted By: hilfy
Date Posted: 05 Nov 2010 at 3:58am

Which version of Crystal are you using?  If you're in XI or above, do the following:

1.  Insert an image on your report.
2.  Right-click on the image object and select "Format Graphic".
3.  Go to the Picture Tab.  Click on the button under "Graphic Location".  This will bring up a formula editor that you can use to tell Crystal where to get the image.
 
-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: Shivacon
Date Posted: 08 Nov 2010 at 8:24pm
Hi,
 
Thanks for your reply.  I am using Crystal Report Server XI R2 version. The followings are my issue.
 
We have a java application with Crystal Report server XI Release 2 version implementation. We are passing all the parameter to the crystal report server like rpt name, filters, report server name and etc. I had developed many reports and configured in my application. All the reports are working fine. They simply fetching the data from my DB and showing in my application.

But, now i have an requirement to show an dynamic image in report. So, I designed one report by using Crystal Report developer edition XI R2 for showing the dynamic image as per the below points.

1. Created one OLE object.
2. Right-click the static OLE object that I inserted, and choose Format Graphic from the shortcut menu.
3. In the Format Editor, click the Picture tab, and then click the Conditional Formula button adjacent to the Graphic Location label.
4. In the Formula Workshop, create the path to my static OLE object.
my path is stored in a database field, added that field to the formula.
5. Click Save and close to return to the Format Editor.
6. Click OK to return to myreport.

If i change the image path in DB and if refresh the report in Crystal Report Developer edition then the report refreshing and fetching the image from new path. But, If i change the image path in DB then open the same report in my java application then it wont work. The old image only displayed(that is whatever the image I saved finally in the Crystal Report Developer edition).But all the data reports are dynamically working in my java application. Please help me to resolve


-------------
Thanks,
Shiva


Posted By: hilfy
Date Posted: 09 Nov 2010 at 3:52am

Are your images on a network drive or on the web server?  Is your java application a web application?  Your application needs to be running under a user ID that has access to the folder where the images are located.  I'm not very familiar with the way that security works in Java, but I believe this means that your Java Application Server (Tomcat, WebSphere, etc.) needs to be running under a network user ID that has access to the images or the images need to be moved to a drive on the web server and need to be accessed using local drive letters or a relative path to your application.

-Dell


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



Print Page | Close Window