for (GridColumnsEnum abscol : abscols) {
drb.addColumn(abscol);
}
I have a for loop that iterates through a collection of abstract columns and adds the abstract columns to a DynamicReportBuilder object. The number of columns added to the DynamicReportBuilder object is dynamic and can range from 5-20.
The drb object is used to generate a report that is landscape oriented. The columns frequently run off the page if there are more than 7-8 columns.
I'd like to know the best way to insert a 'page break' if there are more than 7-8 columns so that the remaining columns are displayed on the next page instead of running off the page.
I've tried various things with the DynamicReportBuilder api - namely, DynamicReportBuilder.setColumnsPerPage(7) - which doesn't seem to have any effect - the columns are not split into separate pages after the 7th column.
Can anyone suggest a way to accomplish this?