2002 JI Open Discussion Posted August 19, 2006 Share Posted August 19, 2006 By: Dhanesh - dbshah Newbie: Please help 2003-10-06 14:42 I am new to JasperReports. With my first Jasper Report I am having trouble printing "detail" section. Your help will be greatly appreciated. Details: Modeled my first <report>.xml from demo/samples/jasper/FirstJasper.xml I have tried filling the report two separate ways: //--- JasperFillManager.fillReportToFile(fileName, parameters,getConnection()); JasperFillManager.fillReport(fileName, parameters, new SimpleDataBean()); --// where getConnection() provides connection handle to a JDBC source. And in second approach: SimpleDataBean is a simple bean which implements JRDataSource Either way my report does not print any details. Header, title, footer etc. get printed. I can post entire <report>.xml if someone may like. Any pointers will be helpful. By: Teodor Danciu - teodord RE: Newbie: Please help 2003-10-08 09:33 Hi, The detail section is generated once for each record in the report data source. If there are no records, the detail never gets generated. Try suplying this as a report data source: new JREmptyDataSource(1) It will create a data source with one record in it. The number of virtual records is specified by the parameter in the constructor. I hope this helps. Teodor 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