Archive for June, 2012

ReadOnlyReportParameterException thrown in SSRS 2008

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:

    CreateReport("ScottsParameter", params);

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

SSRS Visibility

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

Leave a comment

Connecting Visual Studio 2008 to TFS 2010

We have an environment that requires both Visual Studio 2008 and Visual Studio 2010. Our repository is in Team Foundation Server 2010, and that holds both 2008 and 2010 data.

VS 2010 was working fine, but I could not get VS 2008 to connect to TFS. Looking for a solution, I saw blogs that mentioned there should be a “Team” menu, and a “Connect to Team Foundation Server” option under the Tools menu, among other things. I didn’t have that. I had installed Team System 2010 Team Explorer, but it wasn’t working.

So I finally figured out (i.e. found an article) that I needed Visual Studio Team System 2008 Team Explorer to get it working.  Hopefully, I can save someone that “duh” moment by pointing it out.

Leave a comment