Jump to content
We've recently updated our Privacy Statement, available here ×

Calling Jasper Report with no data source


2005 IR Help

Recommended Posts

By: Pensacola Golfer - jmm193

Calling Jasper Report with no data source

2004-05-24 10:45

Can anyone tell me how to call a report without using a datasource? I have a static report, compiled to a .jasper file and when I call it, the pdf comes back empty. When I run it in iReport with no datasource, it works fine. How do I get Jasper to call it with no data source?

 

 

 

 

By: Mark Engstrom - me2kme

RE: Calling Jasper Report with no data source

2004-05-25 06:04

 

Try something like :

 

Assuming an already compiled report object called jdReport.

 

JasperPrint jdPrintOut = null;

HashMap parameters = new HashMap();

JRDataSource ds = new JREmptyDataSource();

 

jdPrintOut = JasperFillManager.fillReport(jdReport, parameters, ds);

 

Then put view it.

Hope it helps.

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