cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports - How to read image dinamycally?

Former Member
0 Kudos

Hi all, I have installed the crystal report runtime 13.0.1.220 for framework 4.0 in a 64-bit windows 7 professional OS. I have a web aplication that opens crystal reports using the crystal report viewer control for visual studio 2010.

What I want to do is for the report to read images dinamycally from an SQL 2008 R2 database table (image type column).

How can I do this??

If not, please, I need guidance on any other way to be able to read images dinamically in a crystal report!

Please Help, Thank You.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

The following is from the CR Help File:





A dynamic static OLE object is a picture or metafile that you access in Crystal Reports by use of a file path or URL. Typically, you use this option when you have the path to your pictures or metafiles stored as a string field in a database (that is, you do not have the actual objects stored in the database). You can also use this option when you have pictures or metafiles stored on a network share, and you know these objects change occasionally. 
The functionality of these dynamic static OLE objects (or dynamic graphics) is created in Crystal Reports through the use of a conditional formatting formula that allows you to link to static OLE objects by reference. 
Note: 
This feature is activated when you refresh your report data; therefore, you may not notice a change in the static OLE object until you click the Refresh button in Crystal Reports. 
When you schedule a report that contains a dynamic static OLE object in BusinessObjects Enterprise, the instances that are created contain the version of the static OLE object as it existed in your Crystal report when you scheduled it. BusinessObjects Enterprise does not update the object dynamically for each instance. 
Reports that use an absolute or a relative path for a dynamic static OLE object are not supported in a BusinessObjects Enterprise environment for this release. If you plan to publish reports that contain dynamic static OLE objects to BusinessObjects Enterprise, it is recommend that you use URL links for your OLE objects. 
To make a static OLE object dynamic
Right-click the static OLE object that you inserted, and choose Format Graphic from the shortcut menu. 


Note: You begin the process of making a static OLE object dynamic by inserting the object into your report as usual. This object becomes the default object. If Crystal Reports cannot find the dynamic reference to the object, it uses the default object instead. 
In the Format Editor, click the Picture tab, and then click the Conditional Formula button adjacent to the Graphic Location label. 
In the Formula Workshop, create the path to your static OLE object. 
For example, if your path is stored in a database field, add that field to the formula. 
Click Save and close to return to the Format Editor. 
Click OK to return to your report. 
Click Refresh to update the reference link to your static OLE object.



Also, see KB [1216897 - Can you insert a picture into a report based off a file path?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313336333833393337%7D.do]

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, Im trying to read the image from the database. The column is of type image (binary data).

How can the OLE DB Object can read this? or What url to use?

I cannot add the BLOB field to the formula in the report.

former_member183750
Active Contributor
0 Kudos

Re. blob fields see KB [1484316 - How to display documents converted to Binary and stored in SQL Server 2000 in a Crystal Report?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333433383334333333313336%7D.do].

(In the top right corner of this web page there is a search box that will search this site for KBases, blogs, articles, even the forums and more)

- Ludek