cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports for Visual Studio SP31 How to change an Image at Run-Time

0 Kudos

I have a Picture Image on a Report. I want to change the Picture at run-time.

How do I change the image when loading the report?

With a text object, I would create a TextObject and assign the new text to the text property.

TextObject tObject = myReport.ReportDefinition.ReportObject["MyField'} as TextObject;

tObject.Text = "New Text".

I was expecting something similar, but cannot find any Picture Objects that allow me to change the picture.

I am using Visual Studio2019 with Crystal Reports for VS13 SP31 using C# code.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Paul,

Firstly get SP 32, SP 33 should be out next week.

CR will only load the image the first time the report is loaded.

Hit the F1 key to bring up the help file and search for Linked Objects.

When adding an OLE or Image file the way to be able to refresh it is to use a data field that holds the path to the image or OLE Object. This way the image is refreshed each time you run the report.

There are no API's to do the same, SDK uses the same work flow CR Designer uses, so unless the image is refreshable using Links it won't change.

Don

Answers (0)