Repeat a subreport¶
You need to have a subreport created at this point.
Once you created a new subreport report, you can repeat it using the following steps.
Selecting a subreport¶
In order to repeat a subreport, you need to select the subreport you want to repeat.
- In the left navigational menu, click on "Reports" and choose one.
- Click on the "New page" and then choose "Subreport".
- Choose the already created subreport.
Enable repeating a subreport with an example¶
We need to set up for repeating a subreport.
Lets say we have data source named "terra" with structure like this:
[
{
"id": 1,
"name": "Bojan",
"description": "Lorem Ipsum is simply dummy"
},
{
"id": 2,
"name": "Vedran",
"description": "text of the printing and"
},
{
"id": 3,
"name": "Ognjen",
"description": "typesetting industry."
}
]
- On the right side of the page, click on the switch "Repeat this report".
- Since the data source name is "terra", "Repeat data source" field should be
{$data.terra}
Setting up alias for data source¶
- Data source should be array, preferably of objects.
- "Repeat alias" field will offer you to set alias name for {$data.terra}, e.g.
$terra
- Now we can use alias to define parameters in groups bellow.
- Already created fields (parameters) will appear bellow the "Repeat alias" field.
- To access data from data source, we need to define fields, e.g.
{$terra.id}, {$terra.name}, {$terra.description}
Please note that data source need to have this properties defined in order to be able to access it.
Preview report¶
Please note that repeat subreport is only possible in preview mode.
- Click on the "Report" tab and then click on "Preview report".
- Repeated data will be visible in preview.