Jump to content
Changes to the Jaspersoft community edition download ×

Newbie: Please help

Recommended Posts

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.



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




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.


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