Combining two Jasper reports

前端 未结 5 1656
迷失自我
迷失自我 2020-11-30 07:15

I have a web application with a dropdown from where user could select the type of report viz. report1, report2, report3, etc.

Based on the report selected, a Jasper

5条回答
  •  抹茶落季
    2020-11-30 07:36

    You can try this one this is work for me

    JasperPrint jp1 = JasperFillManager.fillReport(reportFile1,reportParams,Connection);  
    JasperPrint jp2 = JasperFillManager.fillReport(reportFile2,reportParams,Connection);  
    for (int j = 0; j < jp1.getPages().size(); j++) {  
        //Add First report to second report
        jp2.addPage((JRPrintPage) jp1.getPages().get(j));  
    } 
    

提交回复
热议问题