Jump to content
We've recently updated our Privacy Statement, available here ×

Passing parameters from main report to subreport


colditz

Recommended Posts

 Hi all.

 

I need to pass some parameters from the main report to the subReport.

I've read the way to do it is within the properties the "parameters map expression" property write a name of parameter HasMap type. Ok, i have this parameter associated to this property.

In the property "Parameters" is added the previous parameter.

Now my problem is in the subParameter i dont know how to recovery the values. For example in a text area i have write $F{subParameters}.getValue("price").  I got an error "dont understand getValue method what is.

thanks to all!!

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

You don't need to use any function to display the values of the parameters of your main report in the subreport. You just have to select the 'Parameters' option in the subreport properties and then select "Copy from master" option. This will create the parameters in your subreport and then you just need to drag and drop the needed parameters in the band you want to display them. I send you an attached image to check where is this option.

Hope this helps.

Regards.

Link to comment
Share on other sites

 Other way I've tried is as you say. Using the parameters property in the subreport area.  But I think is not neccessary copy from master because I have already include the parameters I want to pass.So, If I have a parameter in the main report, included in property Parameters, and this property is dropped wherever I need it, it should show the value. But the report always show null.



Post Edited by colditz at 03/12/2012 10:26
Link to comment
Share on other sites

You say "I have already include the parameters I want to pass"... where did you include these parameters? Did you create them manually in the subreport? I don't know what do you mean with that...

I only used 'Copy from master' option for my subreports and the parameters of the subreport where created automatically and defined as it is shown in the picture.

Link to comment
Share on other sites

  • 5 months later...

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