How to create Multiple Page Report in Jasper reports

I don’t know his name but I would like to thank him for providing this simple guide for newbie like me.  Here’s how to create multiple pages in Jasper Reports:

Hello!
Very easy
Each page in report is separated report
for example
i create 3 report with static text
then i fill this report with data and receive 3 files with extention
*.jrprint
In end i gather this files in one pdf file
for filling report with data
String sourceFileName = "file.jasper";
String printFile="file.jrprint";
JasperFillManager.fillReportToFile(sourceFileName, printFile,params,
dataSources);
for gathering files in one report
for (Iterator iter = reportFiles.iterator(); iter.hasNext() {
String fileName = (String) iter.next();
try {
printList.add(JRLoader.loadObject("file.jrprint")) ;
} catch (JRException e1) {
e1.printStackTrace();
}
}
JRPdfExporter exporter=new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_P RINT_LIST,
printList);
exporter.setParameter(JRExporterParameter.OUTPUT_F ILE_NAME,
destFileName);
try {
exporter.exportReport();
} catch (JRException e) {
e.printStackTrace();
}

Related posts:

  1. Sample Code for Multiple Page Jasper Report
  2. Jasper Reports: Invalid ClassDesc Exception on Tomcat Environment
  3. Laguna-Bohol Ride: Expense and Route Report
Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

One Response to “How to create Multiple Page Report in Jasper reports”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
CommentLuv Enabled