2
    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?

Alex K
  • 22,315
  • 19
  • 108
  • 236
user619804
  • 2,286
  • 12
  • 46
  • 71
  • Can you share your code please, i have the same problem and this is my code: http://stackoverflow.com/questions/19498123/how-to-add-columns-to-the-new-page-in-jasperreports-report-when-exceed-the-width . may we can solve it together.[linke](http://stackoverflow.com/questions/19498123/how-to-add-columns-to-the-new-page-in-jasperreports-report-when-exceed-the-width) – michdraft Jan 16 '14 at 08:08

0 Answers0