Here’s the step to configure the report template by entries showing.
The report content is showing base on whole or filtering entries.
-
Select a module, click go to Studio
-
Go to Template tag, click <+ Add>
-
Fill in the template name in “Please enter a name”
Select “Code” (write HTML code in template, refer the tutorial: HTML Tutorial)
In HTML, write the script sample below:<html>
<style>
#preExclude#
page[size="A4"][layout="landscape"] {
width: 29.7cm;
height: 21cm;
}
.main-table {
border-collapse:collapse;
font-size:small;
width: 100%;
border: 1px solid black;
word-break: break-all;
}
.main-table tr td {
border: 1px solid black;
width: 5%;
word-break:break-all;
}
td.highlight {
font-weight: bold;
}
.page-setup {
padding-top: 35;
padding-left: 15;
padding-right: 15;
padding-bottom: 80;
}
#end-preExclude#
</style>
<body>
<table style="border: 1px solid black;">
{start-repeat:item in entries}
<tr style="page-break-before:always">
<td style="border-bottom: 1px solid black;">{item.DocumentId}</td>
<td style="border-bottom: 1px solid black;">{item['From State']}</td>
</tr>
{end-repeat}
</table>
</body>
</html>
IronPython Script:
- {start-repeat:item in entries}: Used for loop the entries
- {end-repeat}: The end-point of looping
- {item.DocumentId}:
- item => every entry in entries through looping
- DocumentId=> Document ID of entry
- {item[‘From State’]}:
- [‘From State’] => information of entry
-
Open “Advanced settings”
- Type: PDF
- Data Source: Entries
-
Click <✓ SAVE>, click to run app
-
In module list, see the activity above. Find a template activity that you created.
eg:
Click that activity to view the report, the report will show all entries of related module.If you need to do filtering of entries report, you may set it through condition of listing before click the report activity