Picture from a public URL
The following dataset is used in the example below that shows how to insert a picture into an ODT
report.
Data
Insert a temporary picture in the template.
Write the marker
{d.logo}
in the alternative text of the picture.To access the alternative text on LibreOffice: Right-click the Image > Format... > Text Alternative.
This replaces the temporary picture by the one linked in the "logo" data. After the document is rendered, the new image from the URL appears on the report. It is also possible to display a list of pictures by writing a loop.
For this example, we set up a database in Ninox that contains a table like the one shown below. The flag preview is optional and is for illustration purposes.
Step 1: Insert the first repetition marker on the description of the first picture
Step 2: Insert the second repetition marker [i+1]
on the second picture
[i+1]
on the second pictureThen, save the ODT
report in LibreOffice.
Step 3: Create a new layout in Ninox
Click the plus icon to create a new layout. Select Dynamic, then click the Import icon. Select the ODT
report (here: Flag images report.odt
). Once the file is uploaded, click the Create button.
Step 4: Insert custom JSON data in formula editor
On the right side, toggle Custom JSON on. Then click the formula field under JSON data input. The formula editor opens.
Paste the Data, then click the Save button.
Step 5: Download the PDF
report
PDF
reportClick the Print icon and select This record to download a PDF
preview.
After the document is rendered, the list of images appears on the PDF
report:
Last updated