我创建了一个报告并以html格式导出报告。但是当我运行它时它会在创建一个html页面时显示一个空白屏幕,当我打开html页面时它也会显示一个空白页面。下面是我的代码。
JasperReport jasperReport;
JasperPrint jasperPrint;
JasperDesign jasperdesign;
//jasperdesign = JasperManager.loadXmlDesign("D:/Tutorials&Lectures/IReport/report1.jrxml");
jasperReport = JasperCompileManager.compileReport("D:/Tutorials&Lectures/IReport/report1.jrxml");
jasperPrint = JasperFillManager.fillReport(jasperReport, null);
//JasperExportManager.exportReportToHtmlFile(jasperPrint, "D:/reports/testReport.html" );
JRHtmlExporter exporter = new JRHtmlExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,"D:/Tutorials&Lectures/IReport/testReport.html");
exporter.exportReport();
我还缺少什么。