We use a Visual Studio 2010 to develop code that access our SSRS reports. I was merrily creating an array of parameters to send to SSRS. The “params” parameter sent to the CreateReport method is that array, and there were three parameters to it, the third being called ScottsParameter:
When I got to the part of my code where the ReportExecutionService did its magic to use this array of parameters:
ReportExecutionService rs= new ReportExecutionService(); rs.SetExecutionParameters(parameters, "en-us");
And I got this error:
The report parameter ‘ScottsParameter’ is read-only and cannot be modified.
—> Microsoft.ReportingServices.Diagnostics.Utilities.ReadOnlyReportParameterException: The report parameter ‘ScottsParameter’ is read-only and cannot be modified.”
I received this because I tried to assign a value to a parameter marked on the report as “Internal”, and you can see the parameter visibility if you open the “Report Data” sidebar in Visual Studio, open the “Parameters” folder, and double click on the parameter. In the “General” tab is a section called “Select Parameter Visibility”.
I was able to resolve the error by not sending that third parameter, and I could get away with doing that because the parameter was a set value and didn’t need to be sent.