Dynamically Changing the SSRS Report Parameter Default Value...

I had a requirement to change the SSRS Report Parameter Default value based on some other report parameter values. Also the particular report parameter is set as Hidden.

For this requirement, I checked most of the forums, but could not find any solution. Most of the forums mentioned it is not possible since SSRS Report Viewer is not behaving like a Web Form and it is static.

But I was able to find an alternative approach for my requirement using the below steps.

Initially I set the default value for the report parameter using the Specify values option in the Default Values section. In the expression, I checked the relevant report parameter values and set the value.
But the issue I faced was, when I view the report by changing the parameter values, default value of the required parameter did not change and it was the initial default value.

To avoid this issue, what I did was, I created a data set and used the same condition inside the data set query and retrieved the value set.

Then assign that data set for the parameter, Available and Default values.

This works for me and each time when the relevant report parameters get changed, the default values of the required parameter also get changed.

I hope this will be useful...



No comments:

Post a Comment

How to run UPDATE/INSERT/DELETE Statements on Azure SQL Database in Microsoft Fabric Notebook...

You can run UPDATE/INSERT/DELETE Statements on Azure SQL Database in Microsoft Fabric Notebook using Python SQL Driver - pyodbc.  For the Fa...