Jump to content
JasperReports Library 7.0 is now available ×

HashMap parameters and report query


2005 IR Help

Recommended Posts

By: Udo Rader - daudo

HashMap parameters and report query

2004-11-15 09:32

I've a situation where I need to pass certain parameters through a chain of generic, reusable subreports that invoke a individual subreport in the end. What individual subreport this is is set in the main report.

 

in short:

main report => generic subreports => individual subreport

 

In order not to keep the subreports generic, I submit the individual subreport's parameters in a HashMap to the generic subreports (that pass them on and on until it reaches the individual subreport).

 

When the HashMap finally reaches the individual subreport, I would like to use the values stored in the HashMap to control the report query, but have failed so far.

 

This doesn't work:

 

-------CUT-------

<queryString><![CDATA[select

*

from

persons

where

p_id = $P{INBOUND_HASHMAP}.get("P_ID")

]]></queryString>

-------CUT-------

 

It is just wishful thinking that that works as written above, but is there a way to retrieve values from HashMaps (or any other object using its methods)?

 

Or maybe more general: (How) can one use parts of java code in the queryString? The $P!{...} trick does it not ...

 

thanks

 

udo

 

 

 

 

By: joersch2 - joersch2

RE: HashMap parameters and report query

2004-11-16 05:02

Hi Udo,

 

i have the same problem. I could't find any way to solve the problem. I read in early threads the same problem, but no solution. I be anxious to read the solution.

 

J?

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