Jump to content
Changes to the Jaspersoft community edition download ×

multiple queries for a single report?

Recommended Posts

By: Liz Stanley - gymell

multiple queries for a single report?

2002-11-20 06:12

Sorry for the double, but I have another question. So far in the samples I've seen, data for the report results from a single, fairly simple query. I've been able to reproduce this with my own data. However, for more complex reports, I was wondering if I would be able to use different queries for different sections of the same report. Is this what subreports are for? Or does each report represent only one query?



By: Sofiane - sofianito

RE: multiple queries for a single report?

2002-11-20 10:39


I have the same problem like u. The only solution I see is to use Scriptlet. I'm extending the Default scriptlet to provide a way to fill report with different queries , the queries are defined as property file. You would access the data this way for example:


((MyScriptlet)$P{REPORT_SCRIPTLET}).getContent( "id" )


id is defined in a property file, like :


id.sql = sql sentence ( Could be a stored Proc or a select statement ) that can can also use report parameters, variables and fields.


I'm also trying to provide support for reading text files ( That way you are not obliged to recompile report each time you modify a static text since u modify only the content of the file ), and also the support of JFreeChart...


As soon I complete the tests I'll post it...



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