Skip to Content
0

dynamic images in CR for VS2015

Feb 15, 2017 at 10:35 AM

77

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Don Williams
Apr 12 at 02:31 PM
0

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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 ?

immagine1.jpg (190.6 kB)
immagine2.jpg (42.0 kB)
0
0
Don Williams
Mar 21, 2017 at 07:44 PM
0

Don't call .Refresh()

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

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

0

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

0