Jump to content
Changes to the Jaspersoft community edition download ×

Problem with FillReportToFile

Recommended Posts

By: Douglas Yu-Cheng Su - su32132

Problem with FillReportToFile

2003-07-01 18:37

I got different results when calling JasperFillManager.fillReportToFile in a standalone environment and under a web environment. By Jasper version is 0.4.6 and iText is 0.96.


When I used the Fonts Report example's FontsReport.jasper and call JasperFillManager.fillReportToFile under a web environment (in a session bean from a servlet), the resulting FontsReport.jrprint is only 436 bytes. But if I call JasperFillManager.fillReportToFile, the resulting FontsReport.jrprint is 5.83 KB.


This problem also causes my exported PDF and HTML file to contain no pages.

Any idea?

Thanks so much.


My Code:


con = Tools.getDSConnection();

JasperPrint jp = JasperFillManager.fillReport("FontsReport.jasper", contents, con);


String pdfFileName = "FontsReport.jrprint";

if( fileType == PDF){

JasperExportManager.exportReportToPdfFile(jp, pdfFileName);

return pdfFileName;


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...