Using an Image in a Report

  1. 3 weeks ago

    How do I convert a JPEG picture to a binary image? I need to insert it into a blob column in a database. Ultimately I am trying to put a logo jpeg image on a report header. I thought I could simply put a ReportPicture control box on the report and select an embedded image from image dropdown menu in the Behavior dialog box. But when I try that, the image does not show up on the report when printed. What is that Image drop down box on the behavior dialogue for?

  2. @Dan Schwartz — Conversion is always automatic in Xojo.

    Once you have declared a column as a Blob column in SQLiteDatabase, you can use the DatabaseRecord.PictureColumn to add a picture. Conversion is automatic.

    RecordSet allows you to retrieve data. It has a generic method named Field which itself has a PictureValue property which you can use to retrieve a Picture.

  3. Thank you very much Stephane! This solved my problem.

  4. 6 days ago

    Jaap H

    Aug 13 Geneva, Switzerland

    Hi there.

    I have a similar issue, I am trying to create a report with a logo image in the header, but when I add the image from a JPG or PNG file, it never shows in the ReportPicture control box. Is this not the correct way to add a picture? Is the format of the picture relevant?

    I am not using SQLite, but SQLServer. The image only appears once in the header, so setting up a database column for this is overkill.

    Thanks!
    Jaap

  5. @Japp Hoetmer — AFAIK about ReportPicture, you can also set a static image from an image or file.

    In the Inspector, select an image from the Image popup menu or select "browse…" from that menu to select a file on disk to be included into your project.

  6. Jaap H

    Aug 13 Geneva, Switzerland

    Thanks, Stéphane, but that simply doesn't work, and is also the reason I ask the question. The ReportPicture stays blank. I tried with Jpeg and Png files, and nothing shows.

  7. @Jaap H — Then you should probably file a bug report.

  8. 4 days ago

    Jaap H

    Aug 14 Geneva, Switzerland

    Not having a good understanding of the printing and reporting features in Xojo, I started to read more about it in the forums and elsewhere, and I get the feeling this is an as-yet underdeveloped part in Xojo. The application I want to create relies on good printing features, multiple printers for reports, labels and other output types, and printer options, and I don't see that Xojo is able to deliver this. The report writer is clumsy, and the problems with the image as mentioned above give it a buggy feel.

    Maybe I should file a bug report, but reading some of the other forum comments I understand printing is in big demand, lots of people are having similar issues, so it is clearly a generic problem in Xojo and needs to be reworked.

    This for me is a showstopper, unfortunately, I will have to put Xojo development aside until this part matures.

    Thanks Stéphane for the replies.

or Sign Up to reply!