Skip to Content

How to have a Section Event fire every time in CR 13.0

Dec 15, 2016 at 07:32 PM


avatar image
Former Member

I am converting a legacy Winforms VB6 app(w/ CR 8.5) to (w/ CR13.0)

In VB6 I was able to perform this code in order to get a report section event to fire:
picSign is a PictureObject in the report section "secSign"

It appears that .FormattedPicture is no longer an option for me to load a image to my "dummy" image on the report. I cant seem to find its CR 13.0 replacement. Surely there is a way to dynamically add a image to a PictureObject. I do not have any stream data all I have is a Diskpath to the desired image.

Any help would greatly be appreciated.

Private WithEvents secSign As CRAXDRT.Section

'section format event: 'this event fires every time this section is generated by the report. Private Sub secSign_Format(ByVal pFormattingInfo As Object) Dim bmp As StdPicture With secSign.ReportObjects If .Item("SignFileName").Value <> "" Then If ValidFile(goPath & "Sign\" & .Item("SignFileName").Value) Then Set bmp = LoadPicture(goApp & "Sign\" & .Item("SignFileName").Value) Set .Item("picSig").FormattedPicture = bmp End If End If End With End Sub
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ido Millet Dec 15, 2016 at 10:22 PM

In Crystal Designer, right click the picture, Format Graphic... and in the Picture tab set a dynamic expression for the 'Graphic Location' property.

10 |10000 characters needed characters left characters exceeded