untitled
viviti
GIS

Offers free applications, tech support and GIS training, demos.

J2EE

Offers free information about Java certification, latest java technology and free applications.

Basics in Jasper IReport Run Jasper

Run Jasper

Once you have JRXML File created you are ready to run jasper report in your application.
check the below codes to execute the jasper report;

InputStream input=new FileInputStream(new File(jrXMLPath));
JasperDesign jasperDesign = JasperManager.loadXmlDesign(input);
jasperReport = JasperCompileManager.compileReport(jasperDesign);
jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), new JRResultSetDataSource(getResultSet(whereClause)));
// if you want to stream to the browser use this
byteArray = JasperExportManager.exportReportToPdf(jasperPrint );
//else
JasperExportManager.exportReportToPdfFile(jasperPrint ,"myReport.pdf");

similarly you can create reports in HTML, RTF (WORD), Excel or XML Format.
 


Web Hosting · Blog · Guestbooks · Message Forums · Mailing Lists
Easiest Website Builder ever! · Build your own toolbar · Free Talking Character · Email Marketing
powered by a free webtools company bravenet.com