cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Parameters from the Main report to the Sub Report

Former Member
0 Kudos

I've seen where you can Change Links and select the parameter from the sub report to link to the main report. That works correctly but I want to do something a bit different and I can't figure out how. My report is a blank Main Report that consists of about 10 subreports. It's a year to date report. My only parameter will be period and the selection formula should be Period <= @Period. If I link parameter to parameter it becomes Period = @Period. How can I get the sub reports to process this correctly? I don't want the user to have to enter the same period 10 times.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Do you have any parameters on main report ?

If you have a parameter Period on main report and the same you want to link for all your sub reports parameters. One thing, when you link parameters from main to sub, it will pass the value from main to sub report and it will not filter your records based on this parameter.

You can define your record selection in all your sub reports like <= {?Period}.

Thanks,

Sastry

Answers (2)

Answers (2)

Former Member
0 Kudos

pass the period value from main to sub report via changing the links

then in sub report, open the selection record and put @period(sub report formula or database field) <= ?period(from main report)

Former Member
0 Kudos

I figured out what I was doing wrong. I was doing exactly as everyone suggests in the answers. The problem was that Subreport Links form had me confused. When you select what to link to, the default is ?PM-?Period. I'm not sure what PM stands for but I left it at the default, which didn't give me the results I wanted. It wasn't until I chose ?Period that it worked. Thanks for the suggestions from everyone.

Former Member
0 Kudos

Set the Sub report link as you have done.

Then go into the select formula and manually change

Period = @Period

to

Period &lt;= @Period

Ian