User Jaspersoft studio I have a table report of Sales Reps and their sales orders.
I would like page breaks groups by the first column (Sales Reps) so it prints a seperate sheet for each sales rep.
Is a group the best way to accomplish a page break based on a field?
I read the groups wiki:
But I don't really understand how to make grouping work with tables.
Seems like groups only work with the root dataset, but when I create a table it forces me to do a new dataset.
Thank you for your suggestions.
I would use a group for the "outer" sales rep and set the flag "StartOnNewPage" to true. So each new grouping expression value will automatically create a pagebreak.
For "inner" records you could then use a SubDataSet for a table component or even a subReport. So this is - so my opinion - the easiest way for separating pages depending on a changed value.
When I remember right, the table component uses an own dataset, as it iterates itself through the records. You can't mix it with the main query, because then two elements would step through your records. You can use the main dataset in the title/summary band to use it within a table component, so that the dataset will iterate just once. But using it in detail or at group level will cause conflicts while stepping from one record to the next one.
hth + regards