wood burning stoves 2.0*
The moose likes Other Open Source Projects and the fly likes Jasper Report blank Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper Report blank" Watch "Jasper Report blank" New topic

Jasper Report blank

Sherryl Philip

Joined: Jul 02, 2004
Posts: 20
I have the following JSP page where I'm trying to view a report which is generated using the iReport tool. But when I try to generate the Report, the Report turns up with the template and it also fetches the number of records, but the records are not seen on the Report. Anybody knows why is this so??
Can anybody help me out?
I'm stuck up here!!!

the Following is the code written for it :

<%@ page errorPage="error.jsp" import="net.sf.jasperreports.engine.*,net.sf.jasperreports.engine.util.*,net.sf.jasperreports.engine.export.*,

Connection conn = null;
String driver = "oracle.jdbc.driver.OracleDriver";
String hostName = "....";
String user = "abcde";
String password = "abcde";

File reportFile = new File(application.getRealPath("/reports/report.jasper"));

JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());

Map parameters = new HashMap();
parameters.put("ReportTitle", "Address Report");
parameters.put("BaseDir", reportFile.getParentFile());

conn = DriverManager.getConnection(hostName, user, password);

JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport,parameters,conn);

/*JasperPrint jasperPrint =

JRHtmlExporter exporter = new JRHtmlExporter();

StringBuffer sbuffer = new StringBuffer();
Map imagesMap = new HashMap();
session.setAttribute("IMAGES_MAP", imagesMap);
System.out.println("before exporter ");
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
System.out.println("JASPER_PRINT ");
exporter.setParameter(JRExporterParameter.OUTPUT_WRITER, out);
System.out.println("OUTPUT_WRITER ");
exporter.setParameter(JRHtmlExporterParameter.IMAGES_MAP, imagesMap);
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "image.jsp?image=");
}catch(Exception e){


Please do tell me where I'm wrong

thanks inadvance

Consider Paul's rocket mass heater.
subject: Jasper Report blank
Similar Threads
file .jasper and jsp
Same Jasper Report keeps opening
Unable to print the report using Jasper
Jasper Reports Excel Output
Help on Ireport to pdf