congyp890813
congyp890813
2017-09-18 23:43

struts2+jasperreport导出pdf,多个jasper合并后,主报表上的子报表不显示

100
  • pdf
  • 合并
  • struts
  • jasperreport
  • 报表
     struts.xml中的result配置

    <result name="Success" type="jasper">
            <param name="location">/reports/MainRP.jasper</param>
            <param name="dataSource">list</param>
            <param name="reportParameters">reportParameter</param>
            <param name="exportParameters">exportParameter</param>
            <param name="documentName">${pdfName}</param>
            <param name="format">PDF</param>
        </result>


//子报表参数
reportParameter.put("subList", subList);
//主报表
JasperPrint jp1 = JasperFillManager.fillReport(BaseSymbols.ROOT_PATH+"reports/MSignRP.jasper", map, new JRBeanCollectionDataSource(list1));
//要合并的报表
JasperPrint jp2 = JasperFillManager.fillReport(BaseSymbols.ROOT_PATH+"reports/examZFRP.jasper", map, new JRBeanCollectionDataSource(list));
//导出设置的参数
List<JasperPrint> jpList = new ArrayList<JasperPrint>();
            jpList.add(jp1);
            jpList.add(jp2);
exportParameter.put(JRExporterParameter.JASPER_PRINT_LIST, jpList);
单独的主报表加子报表是可以全部显示的,但是加上了exportParameters后,子报表就不显示了,怎么回事啊?大神们帮帮忙
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换