cancel
Showing results for 
Search instead for 
Did you mean: 

SetParameterValue has no effect.

Former Member
0 Kudos

When I use reportDocument.SetParameterValue("parameterField", "value") in any report I do not have any problem. My problem is when there is a report that has some sub reports and I use the SetParameterValue to pass a value to a parameter in the main report, the SetParameterValue has no effect and the promport for parameters appear even the sub report has only linked parameters.

I do not use refresh at all.

Please help me to discard the parameters propmpt.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I fixed this problem by setting the parameter values to the report viewer not to the reportDocument. If I SetParameterValue to the ReportDocument to some parameters in the main report in a report has sub reports. the Enter Parameter Value dialog appears even the sub report has no any parameters.

Answers (1)

Answers (1)

Former Member
0 Kudos

I've found that SetDataSorce resets all the params

Set all your datasources first (including the subreports, if it applies) and then SetParameterValue