none
ReportViewer 10 - default parameter values get cleared after report is displayed

    Question

  • Updated:

    I just upgraded from ReportViewer 9 to ReportViewer 10 in ASP.NET environment. When ReportViewer AsyncRendering is set to True and my report has default values for radio button parameters or defaults a string parameter to NULL (resulting in NULL checkbox being preselected next to parameter value) - these default values get cleared after the report is rendered. I don't have any logic to programatically set parameters. Is this a bug in ReportViewer 10?

    Note: when AsyncRendering property is set to False, this problem does not happen.

    Monday, April 26, 2010 6:07 PM

Answers

  • Hi Albert,

    I reproduced your issue, but this issue happens in both ReportViewer 9 and 10. Based on my further research, I surprisingly found that though I deployed the report to my reportserver, it looked that the default parameter settings were not saved at report server. I went to Report Manager, found the report, went to its Properties tab, located the Prameters tab, and I found that the "Has Default" property for the parameter was not checked. I checked it and checked NULL as well, then saved the settings. After that, I could see that it worked well.

    I recommend that you also go to your Report Manager to check if the parameter's settings were correctly saved at your report server. This is probably the cause of this issue.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, May 06, 2010 8:04 AM
    Moderator

All replies

  • Hi Albert,
    I am trying to establish a test environment with VS 2010 to verify this issue. Currently could not please first confirm with me whether you mean that this issue did not happen in ReportViewer 9 but just happen in ReportViewer 10?


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, April 28, 2010 5:35 AM
    Moderator
  • That's correct. This issue did not happen with ReportViewer 9 and started happening with ReportViewer 10.
    Thursday, April 29, 2010 1:45 AM
  • Albert,

    My test with ReportViewer 10 worked fine as ReportViewer 9 did. I performed the test with the DimEmployee table in AdventureWorksDW database. My steps are as following:
    1. Create a report with a Boolean type parameter named "Male" with "Allow null values" checked and default value with the expression "=True";

    2. On the dataset, set the filter as following: [Gender] = IIF(Parameters!Male.Value=True, "M", "F")

    3. Deploy the report to a report server.

    4. In a ASP.NET project, drag a ReportViewer control to the page, set the report server to http://myserver/reportserver, set the report path to "/Reports/Employees", make sure that "AsycRendering" is set to True and save the web page.

    5. Drag the AJAX control Script Manager to the web page, build the ASP.NET project and start to run the web page.

    The default value is correctly checked and the report is well running in reportviewer 10.

    I recommend that you re-check your report parameters settings according to my steps and make sure that you re-deployed the report after you made any changes. You can also try creating a new report as I did for a simple test.

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, May 04, 2010 7:17 AM
    Moderator
  • Hi Charles,

    can you modify your test as follows:

    1. Set default parameter value to NULL instead of True

    2. When you run the report you should see NULL check box pre-selected.

    3. Then, run a report once by clicking on View Report button.

    After report renders - please let me know if NULL check box gets cleared. If it does, that's the problem I'm experiencing.

    Thank you.

    Tuesday, May 04, 2010 1:28 PM
  • Hi Albert,

    I reproduced your issue, but this issue happens in both ReportViewer 9 and 10. Based on my further research, I surprisingly found that though I deployed the report to my reportserver, it looked that the default parameter settings were not saved at report server. I went to Report Manager, found the report, went to its Properties tab, located the Prameters tab, and I found that the "Has Default" property for the parameter was not checked. I checked it and checked NULL as well, then saved the settings. After that, I could see that it worked well.

    I recommend that you also go to your Report Manager to check if the parameter's settings were correctly saved at your report server. This is probably the cause of this issue.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Thursday, May 06, 2010 8:04 AM
    Moderator
  • Charles,

    I have the same problem. And this started happening after upgrading to report viewer 10. Is there a fix coming up for this defect anytime soon?

    Thursday, May 26, 2011 2:39 PM