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:
{ 


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