Display image in ReportPicture

How do I display an image in a ReportPicture. Nothing is working for me.



The picture needs to be a blob field in a REAL SQL database.
Is yours?

Yes, but I’m not loading it directly from the database. I’m saving it as a picture property and then putting it in the report.

That sounds like ‘no’ then?

uhhh… Thank you Jeff.

…well, Im saying it sounds like you aren’t doing what the docs say you should.
Are you after all?

Can you post a screenshot showing the properties of the report picture, showing that is databound to a blob field in a REAL SQL database?
You haven’t posted any code … most people will have looked at this question and not replied because there is nothing to go on.
I’m in the same boat. Theres very little you can say in the face of ‘it doesn’t work’

Select the report picture, then choose the picture you want (included in your project) from the “image” drop down menu under ‘behavior’.

Tony, the image isn’t determined until run time.

Jeff, this is one of the code snippets i have tried. It’s in the Field method

Case "ContactSheet" ReportRakReportsSession.Picture1.Image = rs.Field("ContactSheet").PictureValue Return ""

How about setting a ‘before printing’ handler for the report picture and getting the rs.field picture from that?

I’ll try it. Thanks Tony.

I’m finally back on this.
Xojo 2014 1.1 on Windows 10

I’m getting the data from SQLite3 database, and saving it to a ReportPicture property before setting it in the Xojo Report. All the text fields are working, but I’m unable to get the image to display.

The following code returns NilObjectException:

[code] If rs.Field("ExposureImage").PictureValue <> nil Then
  me.ExposureImage.Image = rs.Field("ExposureImage").PictureValue
End If[/code]

The documentation for ReportPicture says:
Property (As Picture)
aReportPicture.Image = newPictureValue
PictureValue = aReportPicture.Image

The image to be displayed in the ReportPicture.

me.ExposureImage is a ReportImage property
rs.Field(“ExposureImage”) is a blob from the sqlite3 database.