Generate report based on an Entity and Entities in tabular form.
When I generate a report with Order containing one Line i get the image in Tabular line.
When I generate a report with Order containing two or more Lines i get no image at all only the tag in Tabular line.
Hi.
Could you please clarify which platform version do you use, which type of template do you use (Xlsx, Word, etc.) and what field format for the field which contain image do you set in the report setting?
CUBA Platform version: 7.2.11
CUBA Studio plugin version: 15.2-202
IntelliJ version: CUBA Studio 2020.2
I have used Docx as Template.
i have used ${imageFieldId:50x50} on each line.
The lines is an own ReportBand RiserLines and image is an FileDescription reference.
Create typical report for single entity with tabulated region. In region choose field with ‘yourFile.id’. This step needs to make a default template which will be used later.
In editing report window select band with list of entities and change dataset type ‘list of entities’ to ‘JPQL’ like this:
In this example name of band will be ‘NameBand’.
Create a JPQL-query from table (‘Lines’ in your example) with fields which you need in report like this:
Field ‘${parameter_order}’ will be set from entity which you’ll choose for your report.
Alias for column ‘yourFile.id’ will be used in next steps, in this example it’s ‘image’.
Add new value format for field ‘NameBand.image’ like this
Download template here:
change field ‘${yourFile.id}’ to ‘${image}’, save and upload this template to report.
6. Save a report
7. Run