Link to home
Start Free TrialLog in
Avatar of CodeJunky
CodeJunkyFlag for United States of America

asked on

Subreport Parameter using default not what is passed.

Hi all,
I have a sub report in which I am passing a multi-select parameter on the main report. The Sub report parameter is also a multi-select.  The problem I am having is that when the sub report's parameter has a default value it overrides what is being passed into it; but if I have no default value I get an error, "one or more parameter where not specified for the sub report".
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Hi,

Can you send me your rdl to look at.
ASKER CERTIFIED SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CodeJunky

ASKER

I removed and re-added the subreport and parameters.
the Main report has two paremters: @Prop, @WType
the Sub Report has four parameters: @Prop, @mgr, @show_redcoats, @exlude_redcoats.

I right click into the sub report, on the main report, and add the paramters:
NAME                             VALUE
Prop                               @Prop
mgr                                 Null
show_redcoats             false
exlude_redcoats           true

I get the following error: "One or more parameters were not specified for the subreport".
I checked the names/spelling, etc.. The Subreport runs fine on it's own.

I even changed the VALUE of @Prop to a 0, which is the default value in the subreport and get the same error.  If I remove all the parameters of the subreport in the main report it all runs fine accept I am not passing anything to the subreport.
Ok, I got it work; but I tried this before and it failed.  I removed all the parameters in the sub report object within the main report.  I added only the one parameter, @Prop, that I really needed, as the other three where fine with their respective default values.  So my Subreport parameter looked like this....

NAME         VALUE
Prop            [@Prop]