Last post Aug 24, 2011 12:20 PM by desertfoxaz
Aug 11, 2011 05:13 PM|desertfoxaz|LINK
I have a legacy system that is using Crystal Reports 8.5 files to print legal documents. These files are kept in a database and are versioned so if a client requests a copy we can reproduce the exact copy that was previously printed.
To do this we have a VB6 DLL that extracts the file from the database and then loads some photos from a fileshare at runtime by setting the FormattedPicture property using the LoadPicture function in the sectionDetails_format event handler.
We are looking to get rid of all VB6 code and use C# for this part but we're stuck trying to figure out how we can dynamically set those image paths at runtime since the sectionDetails_Format event no longer exists in the newer version of Crystal Reports.
Due to legal requirements I don't think we can modify those reports (such as converting them to a newer Crystal version) so I need to know if there is a way to load the report and programmatically set the images to load from a file path.
Or, is there a way to use the older Crystal 8.5 runtime in C#?
I will be eternally grateful if anybody can help me with this.
Aug 24, 2011 11:57 AM|desertfoxaz|LINK
I've added a reference to the CRAXDRT.dll and have access to the object and the event that I need to wire up to. Inside the sectionDetails_Format event handler, I need to set the FormattedPicture property of the picture (OleObject). In VB6 we were using
LoadPicture but I'm using C# and I need to find an equivalent.
Setting this property to a bitmap or a filestream doesn't work. Does anyone know what can be used?
Aug 24, 2011 12:20 PM|desertfoxaz|LINK
This looks promising: