multiple queries for a single report?

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

Sofiane
2001 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:26am
Last seen: 16 years 9 months ago

0 Answers:

No answers yet
Feedback