2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now