cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic images in CR for VS2015

mbossu
Explorer
0 Kudos

Hi,

a report contains an image (OLE object) with “Graphic location” = {@Image_link} (formula), that is dynamically updated from VB2015 as follows:

Dim cryRpt As New ReportDocument

cryRpt.Load("xxxx.rpt")
cryRpt.DataDefinition.FormulaFields ("image_link"). Text = ControlChars.Quote & sPathImage & ControlChars.Quote
crViewer1.ReportSource = cryRpt
crViewer1.Refresh ()

The image is not updated during preview..

Thank you for help.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

What if you create the report with a linked image does that work?

New report Designers use a database field to link to an image file so it can be refreshed, just add the path in the field data..

If not it will only look for the image on report load, refreshing will not update the image because you are using the original reports image properties, not linked or not using a database field to get the physical location of the image.

mbossu
Explorer
0 Kudos

The link in the "image_link" formula works correctly and the Crystal Report preview load the new image ..

When I change the value (link) runtime in the program it loads the default image ..

If I use a database field instead of the formula the result is the same..

Some instructions are missing to force the refresh ?

mbossu
Explorer

Answers (1)

Answers (1)

0 Kudos

Don't call .Refresh()

mbossu
Explorer
0 Kudos

Thanks, I had not seen the answer (not received via email)

but the result is the same, continue to display the default image ..

0 Kudos

In this case you want to use the refresh() api.