Pass Parameter Map to Subreport

By: Eric Everman - eeverman
Pass Parameter Map to Subreport
2002-08-23 09:03
Hi all-

I know its possible to pass the entire set of parameters to the subreport - it was mentioned off-handedly on a post somewhere.

Can anyone tell me how to do this? Its not in the current docs. . .

Thanks,

Eric Everman


By: Eric Everman - eeverman
Found it
2002-08-23 10:51
OK, just needed to download the new docs.

My bad.


By: JC Tchitchiama - jeanch
RE: Found it
2002-10-01 04:46
Eeverman,

Could you please post and code snippet as I am trying to get to work and get a Null Pointer Exception in JRBaseFiller

Cheers
JC


By: Eric Everman - eeverman
RE: Found it
2002-10-01 06:40
Well, I don't have a current sample - I have used this, but have since forgotten which project it was on. But, its very simple, below is an (untested) snippet for a subreport. Also check out the current docs for the subreport
http://jasperreports.sourceforge.net/quick.reference.html#subreport


<subreport isUsingCache="true">
<reportElement x="5" y="25" width="240" height="28" backcolor="#DDFFFF"/>
<parametersMapExpression>
REPORT_PARAMETERS_MAP
<parametersMapExpression>
<subreportParameter name="org_id">
<subreportParameterExpression>
$F{id}
</subreportParameterExpression>
</subreportParameter>
<connectionExpression>
$P{REPORT_CONNECTION}
</connectionExpression>
<subreportExpression class="java.lang.String">
"SubReportName.jasper"
</subreportExpression>
</subreport>


By: Eric Everman - eeverman
Oops - Small amendment to last post
2002-10-01 06:44
Replace "REPORT_PARAMETERS_MAP" with "$P{REPORT_PARAMETERS_MAP}"

ee


By: JC Tchitchiama - jeanch
RE: Pass Parameter Map to Subreport
2002-10-01 08:19
Ee,

That works fine now Ta vewry much
JC
2001 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:26am
Last seen: 17 years 1 month ago

0 Answers:

No answers yet
Feedback
randomness