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

Problems with parameter prompt in sub report


smullen

Recommended Posts

Hi,

Please bare with me as I am new to iReport 4.0.1 and reporting in general.

I have report that when it is run it prompts for the value of client_id then uses this to generate the correct data for the report. However, when I have put this report as a sub report, I am no longer prompted for the value of client_id anymore? Is there a way to get it to prompt again or have something setup where I can pass the value through from the master report to the subreport?

Thanks

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Is this value a field in the main report?

If so - Try this:

Create a parameter in the main report named p_clientID. Make sure that it is set to "Is For Prompting" is selected. Then click on the sub report object, and then the subreport tab, click parameters and add a new parameter with the same name. Then click expression (a box with [...] will show) and use the field from the main report.

In your subreport, modify your query to something like "WHERE client_id = $P{p_clientID}"

This should pass the parameter from the main report to the sub report.

If it is not a field in the report - Create same parameters, but the expression would be $P{p_clientID} or $P!{p_clientID}

Link to comment
Share on other sites

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