The report parameter 'param1' is read-only and cannot be modified. (rsReadOnlyReportParameter)
  • hey guys..

    I'm trying to get the report that I need to be filtered by a parameter value (named Param1)

    I created a parameter in the data tab and tried to pass a value from my Web application to the report services.. now my report have that textbox that prompts me to enter the filtering value for the report I want.. everything works fine till this point..

    now I have another webpage that has a report viewer and a textbox for the user input the value they want.. and pass it to the report.. and I'm using the following code to pass the value to the report I made earlier..

     

    Dim par(0) As Microsoft.Reporting.WebForms.ReportParameter

    par(0) =

    New Microsoft.Reporting.WebForms.ReportParameter("paramSiteCode", TextBox1.Text.ToString)

    ReportViewer1.ServerReport.SetParameters(par)

    ReportViewer1.ServerReport.Refresh()

     

    however.. now I'm getting an error.. "The report parameter 'paramSiteCode' is read-only and cannot be modified. (rsReadOnlyReportParameter)"

    what am I missing here? I've been thru the help and forums.. and the code should work.. or so I hope it would.. thanks in advance..

All Replies

  • Friday, April 06, 2007 6:07 AM
    Avatar of Shyam Sundar
    Silicus Technologies
                                             (Partner)                                       
    1,020

    I guess you have set the paremeter as Internal (check box in Report - Report Parameters dialog). Uncheck that and then your report might work.

    Shyam

  • Thursday, June 07, 2007 8:10 AM
    Proposed Answer
    Details
    Product:sql server reporting services
    ID:rsreadonlyreportparameter
    Source:microsoft.reportingservices.diagnostics.utilities.errorstrings.resources.strings
    Version:8.00
    Message:The report parameter '{0}' is read-only and cannot be modified.
      
    Explanation

    This error occurs when you attempt to set a value for a parameter that is read-only. A parameter is read-only when the Prompt property for the parameter is set to false.

      
    User Action

    To set a value for a parameter, the Prompt property for the parameter must be set to true. You can set this property in two ways:

    • Before publishing the report, provide a prompt string for the parameter. In Report Designer, you can provide a prompt by typing a prompt string in the Prompt text box in the Report Parameters dialog box.

    • After publishing the report, set the Prompt User property for the parameter. In Report Manager, in report properties, click the Parameters tab, and then select Prompt User for the parameter.

    For more information about report parameters in Report Designer and Report Manager, see Books Online.

    In the release version of SQL Server 2000 Reporting Services, when Prompt is true and Prompt String is blank, the parameter is still available to the user in the report viewer. In SP1, when Prompt is true and Prompt String is blank, the parameter is hidden from the user.

    Note: Publishing a report over an existing report on the report server does not overwrite the parameter information. To update parameters for an existing report, either delete the report on the report server and republish, or update the parameter information for the report in Report Manager.

    • Proposed As Answer byErnestoMawan Thursday, September 30, 2010 11:40 AM
  • Monday, March 31, 2008 1:55 PM
    Avatar of Maria Elmvang
    Netcompany
                                             (Partner)                                       
    5
    Hi Shyam,

    I have the same problem as mentioned above, and tried unchecking the "internal" checkbox, but it made no difference. Do you know where my error may be?

    Thanks,
    Maria
  • Friday, September 05, 2008 6:26 PM
    Parameter NameData TypeHas DefaultDefault ValueNullHidePrompt UserDisplay Text

    Here is the solution.

    1. GoTo http://<servername>/Reports

    2. Browse to the report you want to access.

    3 You will the report with textbox i suppose. Click on the properties

    4.on the left side you will see the parameters click on that.

    5. you will below list.Check checkbox for prompt User.

    Parameter NameData TypeHas DefaultDefault ValueNullHidePrompt UserDisplay Text

    In ASPX PAGE

    List

    <ReportParameter> liparam = new List <ReportParameter>(1);

    liparam.Add(

    new ReportParameter("param1","ANYSTRINGVALUE", false));

    ReportViewer1.ServerReport.SetParameters(liparam);

    there you go

    Nexustoday

  • Thursday, February 25, 2010 2:41 PM
    Thank you for this information!  The MOST IMPORTANT piece of info for me was this:

    Note: Publishing a report over an existing report on the report server does not overwrite the parameter information. To update parameters for an existing report, either delete the report on the report server and republish, or update the parameter information for the report in Report Manager.


    I tried everything to get that error resolved, but it turns out nothing i did was actually updating the parameters on the server because they were not getting overwritten.

  • Thursday, September 30, 2010 11:41 AM

    AbdulRauf thanks a lot for this hint:

    Note: Publishing a report over an existing report on the report server does not overwrite the parameter information. To update parameters for an existing report, either delete the report on the report server and republish, or update the parameter information for the report in Report Manager.

  • Friday, March 18, 2011 4:43 PM
    Avatar of Graham Stalley
                                             (Partner)                                       
    0
    For those still struggling with this issue:
    The good news is that Update Rollup (16) for Microsoft Dynamics CRM 4.0 seems to address the issue: http://support.microsoft.com/kb/2477743

    To quote the notes, it says the following issue has  been resolved:
    Assume that you create a custom report in an instance of Microsoft SQL Server 2008.
    Additionally, the report contains the CRM pre-filtering criteria.
    When you run the report, you receive the following error message:
    Reporting Error. The report cannot be displayed
    Error Number: 0x80040494 Error Description: The report parameter 'P1' is read-only and cannot be modified. (rsReadOnlyReportParameter)
  • Wednesday, April 27, 2011 3:19 PM
    Has Code
    Details
    Product:sql server reporting services
    ID:rsreadonlyreportparameter
    Source:microsoft.reportingservices.diagnostics.utilities.errorstrings.resources.strings
    Version:8.00
    Message:The report parameter '{0}' is read-only and cannot be modified.
      
    Explanation

    This error occurs when you attempt to set a value for a parameter that is read-only. A parameter is read-only when thePrompt property for the parameter is set to false.

      
    User Action

    To set a value for a parameter, the Prompt property for the parameter must be set totrue. You can set this property in two ways:

    • Before publishing the report, provide a prompt string for the parameter. In Report Designer, you can provide a prompt by typing a prompt string in thePrompt text box in the Report Parameters dialog box.

    • After publishing the report, set the Prompt User property for the parameter. In Report Manager, in report properties, click theParameters tab, and then select Prompt User for the parameter.

    For more information about report parameters in Report Designer and Report Manager, see Books Online.

    In the release version of SQL Server 2000 Reporting Services, when Prompt istrue and Prompt String is blank, the parameter is still available to the user in the report viewer. In SP1, whenPrompt is true and Prompt String is blank, the parameter is hidden from the user.

    Note: Publishing a report over an existing report on the report server does not overwrite the parameter information. To update parameters for an existing report, either delete the report on the report server and republish, or update the parameter information for the report in Report Manager.

    I struggled with the same problem in VS 2010.

    After a long series of hoops to jump through, I modified the rdlc file by hand and added <Prompt>true</prompt>. This parameter cannot be set through the GUI - go figure.

    In my case, I was attempting to generate a sub report, and pass a parameter to the sub report.

    To get this to work, the sub report needed these two sections.

     

     <ReportParameters>
      <ReportParameter Name="Network_Id">
       <DataType>String</DataType>
    	 <Prompt>true</Prompt>
      </ReportParameter>
     </ReportParameters>
     <Variables>
      <Variable Name="Network_ID">
       <Value />
      </Variable>
     </Variables>
    
    

     

    I was then able to use the name "Network_Id" in the sub-report properties of the "sub report control" for the name of a parameter on the parameters tab. I then set it to the key value that I need in the subreport properties dialog.

    Prior to setting prompt to true, I kept getting the read-only exception.

    I'm not sure if I am being clear about this, but sub reports do work, and prompt can be manually added to the report definition file.

posted on 2011-09-26 21:19  大斌锅  阅读(313)  评论(0编辑  收藏  举报