Jump to content
Changes to the Jaspersoft community edition download ×

Could not generate report using JasperReport

2004 IR Help

Recommended Posts

By: Jerry Shao - shaogang

Could not generate report using JasperReport

2004-03-13 07:56

I am using iReport to design the report. If preview in iReport JRView Preview. It shows the report and seems everything is ok. (There is no database connection for this report. Only parameters needed) When using code to generate report. It shows blank report. Anyone knows why? Thanks for your help!


JasperReport jasperReport;

JasperDesign jasperDesign =



// Load JRBshCompiler from classpath

JRBshCompiler theCompiler = new JRBshCompiler();

jasperReport = theCompiler.compileReport(jasperDesign);


Map inputParameters = new HashMap();


// Fourth, create JasperPrint using fillReport() method

JasperPrint jasperPrint =

JasperFillManager.fillReport(jasperReport, inputParameters, null);


// Or to view report in the JasperViewer



// You can use JasperPrint to create PDF

JasperManager.printReportToPdfFile(jasperPrint, "c:\report.pdf"));





By: Giulio Toffoli - gt78

RE: Could not generate report using JasperReport

2004-03-13 10:35


Pass as datatsource a JREmptyDataSource







By: Jerry Shao - shaogang

RE: Could not generate report using JasperReport

2004-03-14 07:46

Thanks!!! It works.

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