Dynamic images in .NET applications

Monday 22 March 2010 @ 9:47 am

Dynamic images are a great feature of versions 11 and 12 of CR.  They work pretty well and are mostly trouble free, if you are in the report designer.  But if you try to run this report from an application, in something like VB or .NET, you might find that everything works fine except for the dynamic images.  I know a developer who ran into this problem this past week and resorted to opening a support ticket with SAP to get it resolved.

What she discovered was that she was not alone.  SAP has written an article explaining the problems developers face with dynamic images.  The article is by Ludek Uher and is called: Crystal Report Viewers in Visual Studio .NET – Dynamic Images.  Anyone else who runs into this might want to read this article before you call support.

Also, make sure you are not using on the Crystal Reports runtime files provided with Visual Studio.  These are from an older CR version (v10.x) which does not support the new dynamic image feature.  You will need to own either CRv11 Developer Edition or CRv12 (there is only one edition of v12).  Using one of these gives you the license to the latest runtime files, which are needed to incorporate dynamic images.  The v10 engine will run v12 reports fine in all other aspects, but your dynamic image will be replaced by the red ‘x’ when the report is run.

And, if you have installed multiple versions of Crystal and/or .Net you may create a conflict between the DLLs of an existing project.  To resolve this, create a new project in .Net, add a Crystal viewer and bind the viewer directly to the report.  If the images appear you can rebuild your application in the new project.

And if you are new to running reports from .NET you might want to get my Quick Reference to Crystal Reports in VB.NET.  This small document gives you simple syntax examples for changing the basic report properties at runtime, and for passing connection info, formulas and parameter values.









Leave a Reply

Recrystallize Pro