dbReport - variable pictures

Hello,
I am using dbReports to print a one page report. this report have three pictures.
The sqlite table only have fields with the name of the picture file. I then went and copied the corresponding jpg to a fixed filename called “picture1.jpg” for the first one before i called dbReportPrevire. When i run the app, I check to make sure the file got copied from a folder I have called “photos” to the main folder where the app exe is at with the name “pocture1.jpg” for the first picture. When I preview the report, the pictures doesnt change from the one I specified at desing. I even went to the design and made the picture property just “picture1.jpg” but got a red circle instead.

My question is, how can I tell dbreport to look for “picture1.jpg” in the app folder so it will load the correct picture of that particular record. I dont want to have a “fixed” location but rather wherever i run the app from

Thanks in advance

well, there are not available form to do that, only change the source code, for each field (the database field are TEXT) you have to eval if are path are valid, the file exist, then open as image and try to “print it”

if you don’t have the source code, maybe set a picture field with file, temporarily

thank you. ok, i will set a temp table and copy the images there before i call the report

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.