Jump to content
Changes to the Jaspersoft community edition download ×

Report without database query

2004 IR Help

Recommended Posts

By: Roque Campos - roquec

Report without database query

2005-07-04 13:31

Dear Friends:


First of all, I have to request apologizes about my bad english.


I need to do a little report, wich has not a query: it has only a few parameters that are known before launching the report.


The only way that I found was making a report with a fake query (select sysdate form dual), and then calling that report passing him the parameters.


If I leave the query "blank", Jrviewer just shows me a blank page, in spite of I was passing him the parameters.


Currently my solution works with the fake query, but I know that is is not very elegant.


Is there any standard way to do reports without quering a database? Reports with a few parameters passed by the application.


Thanks in advance


PS: I'm using Ireport to design it





By: C-Box - c-box

RE: Report without database query

2005-07-04 22:44

You needn't pass any query if you don't pass also a database-connection...


so if you don't want to use a connection just use "new JREmptyDataSource()" as parameter when filling the report.


As you want to use parameters instead you must put them into the parameter-map.... I guess that is clear... but therefore that the report doesn't get any "real" data, you must set your report attribute "WhenNoData" to the value "AllSectionsNoDetail" instead of "NoPages".... note that you dont place your parameter in detailband but instead into a dummygroupheaderband or title or whatever! :-)




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