Get and Save Parameters After Report is Run

Posted by: thread77 on 3 August 2017, 6:19 am EST

  • Posted 3 August 2017, 6:19 am EST


    I wanted to see if there is a way to obtain a list of the parameter values for a report after the report has been run (via the web viewer). I am trying to find a way to allow our users to set a list of parameter values within the report, then allow them to save those values so we can auto-load them later on.

    For example, say I have report A. Report A loads up, then the user enters values for the parameters in the report. They then run the report by clicking the 'View Report' button in the viewer. At this point, I was hoping they could click a 'save' button on my web form, and then my code could get a list of all parameters and the values entered from the viewer. I don't need the datasets or anything, just the parameters and the values entered. This way, I can save the parameters and values, then load them up the next time the report is run. Is this possible to do?


  • Replied 3 August 2017, 6:19 am EST

    Hello Richard,

    You may try implementing your own parameter panel to give this desired effect.You may try

    1) Setting the SidebarVisibility property of the reportviewer to false, which will hide the WebReportViewer's sidebar.

    2) Add your own textbox for your users to enter the parameter values and a view button to update the WebReportViewer.

      ReportRuntime _runtime = new ReportRuntime(_reportdefinition);
       _runtime.Parameters[0].CurrentValue = this.ParameterTextBox.Text;//Set the parameter from your code.

    3) Now you can add buttons to your ASP.NET form which would save the text entered in the ParameterTextBox and also to retrieve the same when needed.

  • Replied 3 August 2017, 6:19 am EST

    Hi Prantik, I tried to read parameter's value after running the report using that but I am getting null all the times for CurrentValue, somehow. None parameter accepts <u>either</u> null <u>or</u> blank value.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels