Page 1 of 1

[ReportWorkshop][Unit] Image file names in fields

Posted: Sat May 12, 2018 4:59 pm
by Sergey Tkachenko
Question:
In my database, instead of saving the image, I saved the image path.
How can I make Report Workshop display the image for the path?
Answer:
This is not a standard functionality, but it can be implemented with a very simple add-on.
Report Workshop implements standard field types, such as 'int', 'image', 'time', etc.
The attached unit implements 'imagefromfile' field type:
RVReportImageFromFileFieldObject.zip
(1.04 KiB) Downloaded 4579 times
Include it in your project.

Let you have a field named FIELDNAME containing file names of images.
Use this syntax to insert these images in your report:

Code: Select all

{FIELDNAME imagefromfile}
You can use format strings, the same as for normal images, for example:

Code: Select all

{FIELDNAME imagefromfile "width=100"}