Reputation:
I have couple of parameters in my SSRS report. some are multivalued and some are regular with drop down list. each time while selecting a different parameter value the page is getting refreshed. Is there any way to avoid this page refreshment on each parameter selection.
Thanks in advance. Maria
Upvotes: 14
Views: 38542
Reputation:
In this example, I have tried for the DateTime
parameter postback
Hope it works for you as well
For the DateTime
field in the Parameters make first a parameter as dummy Date value & then assign this DateTime
value to the actual DateTime
parameters of the report.
Suppose we have a Stored Procedure where we have to supply From Date and To Date
DateTime
parameter Datetime_Dummy
as the Name
and DateTime
as the DataType
=Today()
DateTime
parameter in the datetimes parameterFromDate
parameter's DataType
to DateTime
=Parameters!Datetime_Dummy.Value
This prevents the page from posting back when a new From
date is selected.
Upvotes: 2
Reputation: 1
For me this was resolved by disabling X-Content-Type-Options: nosniff custom header in the web.config.
<customHeaders>
<add name="X-Frame-Options" value="SAMEORIGIN" />
<!--
<add name="X-Content-Type-Options" value="nosniff" />
THIS BREAKS SSRS REPORTS, causes clickable controls to immediately reload page
-->
<add name="X-XSS-Protection" value="1; mode=block" />
</customHeaders>
Upvotes: 0
Reputation: 399
I just encountered to this problem today, and the following post definitely helped me.
http://blog.summitcloud.com/2009/12/fix-refresh-of-parameters-in-ssrs/
quoting from the post:
According to Microsoft, if a default value or valid values list is “too complex” (could be as simple as
=Year()
expression) for the RS engine to comprehend at runtime it will determine that it is dependent and therefore a candidate for refreshing.
The post in the link shows a simple workaround example:
If you can, take those VB expressions and turn them into datasets that return values based on an SQL statement. So
=Year()
in the expression would become something likeSelect Year(getdate()) as CurYear
Hope it helps.
Upvotes: 5
Reputation: 62
Following is an approach that worked for me based on a post I read elsewhere.
In my scenario I had a boolean parameter for which I had provided Yes and No captions and corresponding true and false values directly (not via a query). I also had 2 date time parameters. None of these were tied with each other.
Every time, I entered values for any of the dayes and tabbed over, SSRS would refresh itself. It seems SSRS tries to resolve the expressions which in my case were the values for the Yes and NO options.
The solution was to use a dataset to return the Yes and No values which resolved the issue for me.
Upvotes: 1
Reputation: 19
I have done this many times ago this was just removal of parameters dependency with various permutation and combinations as per need in projects.
Just do following things.
I hope it will helpful.
Thank You.
Upvotes: -2
Reputation: 119
This is rather long to resolve, However I was able to figure it out. The page keeps refreshing because you have dependencies between paremeters (The Last parameter you create, depends on all the ones that you created before it)
In order to resolve this you will need to follow these steps to remove the dependencies:
1)Right Click on the Datasets folder on the Report Data pane -> Show Hidden Datasets (SSRS 2008 automatically creats a dataset for each parameter that you add)
2)Double click on each Hidden Dataset that appeared (namely the parameter datasets) -> Query -> Query Designer , on the top right there is like a blue triangle on top of a ruler (Design Mode), and at the end of the query where it says From [Database Name], you will need to erase everything before that until (not including) ON ROWS (the first ON ROWS from the bottom) ALSO DELETE ALL THE CLOSING BRACKETS')' AT THE END OF THE QUERY
3)click ok to apply changes then click on parameters and delete everything in that list, and press ok to apply.
4)Expand the Parameters folder in Report Data, Double click on each parameter ->Advanced-> Never Refresh
This should take care of the refreshing :) Thank you, Chris
Upvotes: 0
Reputation: 67068
Not easily unless you willing to roll your own report viewer control. This is done because SSRS has parameters which can be used to determine the value of other parameters. For example imagine your looking at website users and your first option is OS, perhaps it has Vista, XP, and Mac.
When you select Vista the page refreshesh to get a list of all the various versions of Vista.
If you are using thing like this, then you won't be able to prevent the refresh.
Upvotes: 2