Jump to content
Changes to the Jaspersoft community edition download ×

Parameter name of master report and sub repor

Recommended Posts

By: Benjamin Lim - benlim

Parameter name of master report and sub repor

2002-11-01 01:54

Hi, is it true that the parameter name of the master report and that of the sub report can't be the same name?

eg, Master report


<parameter name="representative" isForPrompting="true" class="java.lang.String"/>



Sub report


<parameter name="representative" isForPrompting="true" class="java.lang.String"/>



I encountered this problem where


<subreportParameter name="representative"> <subreportParameterExpression> $P{representative} </subreportParameterExpression>



The whole report will not be previewed. But at the background, it is consuming memory. Like its going into an endless loop.

After changing the parameter name in the sub-report,the report can be previewed.





By: Teodor Danciu - teodord

RE: Parameter name of master report and sub repor

2002-11-06 13:04




No, this is not true.


Note that you can pass to your subreport the same

parameters that the master report has received

using the <parametersMapExpression> and the



Check the "Quick Reference" for details.



to your subreport, make sure your wrap it in a new

java.util.Map instance, because if not, the built-in

parameters of the master report will be overridden

by the subreport built-in parameters.


For example, the REPORT_DATA_SOURCE

parameter of the master report will contain the data

source of the subreport after the subreport is

generated and in some cases this might have

unexpected results.






I hope this helps.


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