Jump to content
Changes to the Jaspersoft community edition download ×

blank report with tomcat


mahdi

Recommended Posts

hi every body,

 

i'm developing a web application using java/eclipse(jsp and servlet), mysql, tomcat 5.0.

 

when i launch the server tomcat from eclipse (using the plugin tomcat for eclipse), the reports are printed correctly without any problem. but once i launch the server tomcat from the monitor tomcat, all pages are blank.

 

can anybody solve this problem ?? (i hope so, because i have never had a reply for my posts)

 

here is my java function that creates the report into pdf format :

 

public static String setPlanningReviewsForYear(String year) {

try {

// set properties

System.setProperty("org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser");

// parameters

Map parameters = new HashMap();

parameters.put("SUBREPORT_DIR", "C:Documents and Settingsakkouh.mahdiworkspaceadminApp3report");

parameters.put("year", year);

parameters.put("dateBefore", year + "-01-01");

parameters.put("dateAfter", year + "-12-31");

// jasper objects

JasperDesign jasperDesign;

JasperReport jasperReport;

JasperPrint jasperPrint;

// get connect

Connection conn = ProcessDB.getConnectODBC();

System.setProperty("java.class.path", "java.class.path");

// load main report

jasperDesign = JRXmlLoader.load("C:Documents and Settingsakkouh.mahdiworkspaceadminApp3reportPlanning_Reviews.jrxml");

jasperReport = JasperCompileManager.compileReport(jasperDesign);

// make pdf

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

String reportName = "Planning_Revues_" + year + ".pdf";

JasperExportManager.exportReportToPdfFile(jasperPrint, "C:Documents and Settingsakkouh.mahdiworkspaceadminApp3report_pdf" + reportName);

//ProcessDB.getDisconnect();

return reportName;

} catch (JRException ex) {

System.out.println("JRException: " + ex.getMessage());

return "";

}

}

 

the *.jrxml file is generated by ireport, and it inclues ontly some fields.

 

thx,

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...