load jasperdesign from xml and compile?

By: Kuo Lung Ching - ching_kuo
load jasperdesign from xml and compile?
2003-01-28 19:56
I load jasperdesign from xml and compile.
Why can't get .jasper file and export report to pdf and html ???

JasperDesign jdesign=JasperManager.loadXmlDesign("BasicReport.xml");
JasperReport jreport=JasperCompileManager.compileReport(jdesign);
Map parameters=new HashMap();
parameters.put("ReportTitle", "Basic JasperReport");
parameters.put("MaxSalary", new Double(25000.00));

JasperPrint jprint=JasperFillManager.fillReport(jreport,parameters,new JREmptyDataSource());

JasperManager.printReportToPdfFile(jprint, "BasicReport.pdf");
JasperExportManager.exportReportToHtmlFile (jprint,"BasicReport.html");
2002 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:28am
Last seen: 16 years 9 months ago

0 Answers:

No answers yet