SSRS Report Subscription and Time Sensitive Query Based Default Value - ssrs-2008

I am creating a subscription for a report and want to use the default value for a query based parameter that is time sensitive. My question is, when is the default value set for the parameter? At the moment the subscription is created or executed?

The query based default value is calculated at execution time.

How the default value for parameter is get calculated at execution time? Are you using the cascading parameter?
When you check the subscription setting page, the default value for parameter is the same as the default you set for that parameter in SSDT, and the cascading parameter value will be changed corresponding to the first default parameter value.

Related

Get previous value of a parameter in Tableau

Let us assume that we have defined the following parameter
Now, user can select a value for Data_Selekcja parameter, for example '2018-01-01'. Is there a way of getting the previous value from the list? Previous value would be '2017-07-01' in this case. I need the previous value of this parameter in a calculated field. The current value in a calculated field is given by [Parameters].[Data_Selekcja], but what about the previous value from the list.

Multiple Parameters in crystal report

I have created a crystal report layout with 3 parameter.
The 3 parameters are
1.) Date range
2.) Supplier
3.) Location code
User will always give input to the date range but will select either of these remaining two parameters based on the usage.
Is it possible to configure in one single report with optional option in Crystal layout
Assuming you are not using a very old version of Crystal, when you create or edit a parameter, look at the list of parameter properties: one of them is 'Optional Prompt' -- simply change it from the default of False to True.
Then, in your record select logic you can use the HasValue() function to check whether the user provided a value for that parameter.

SSRS Report Subscription Parameters (Date Values)

I am looking to setup a report subscription in SSRS 2008 R2 where the client user can set the date parameter to whatever the individual user would like. I have been reading multiple suggestions to use =Today() in the parameters but this syntax does not work for me. Does anyone know whether is is possible to set my from date to "Today -30 days" and my to date to "today"? What is the syntax used in the subscription parameters?
Settings:
Error:
As described in the above link provided by praveen the solution became to create two parameters in the report containing integer values with a label that describes the periods i would like to use in my subscription. These parameters can easily be set to "Hidden" so they are not showing when you would like to run the report by hand. I also chose to set the default value for both parameters to 1 which is my value for Today(). This mean my report will start out with having today's date selected in both of the visible date parameters.
In the two date parameters that are shown in the report you can then set the default value to a switch of the values you are able to pick in your hidden date parameters. You can now setup a subscription that will work and that looks like the following:

Reporting services cascading parameter not working

I want the report to pick default date time values based on a location parameter the user picks, but the problem is that the date time parameters don't update when the user picks a different location. I made sure to put the location parameter above the date time parameters but it is still not functioning as I expect, what am I doing wrong here?
Unfortunately this is "by design".
Microsoft Connect - SSRS - default not refreshed for cascading parameters.
Posted by Microsoft in 2007: "As described, this is not
a bug. We do not re-evaluate the default value for a subsequent
parameter unless the selected value is no longer in the valid values
list. We do not know whether the current value was specifically
requested by the user or it is there because of the default. You could
make a case to have control over this behavior through some sort of
property but it is currently working as designed."
I think this is a bug in SSRS. But Microsoft have closed the issue. Please log onto connect and vote this to be fixed if it is affecting you too
Microsoft Connect - Your feedback improving Microsoft products.
Workaround / hack is here: Boyan Penev - SSRS Cascading Parameters Refresh: Solved.
However the hack only works if the dependent parameter has a LIST of valid values, and other users report that it only works for the first dependent parameter.
If the dependent parameter is free-form entry or a date, the hack cannot be used at all.
Consider putting your datetime values in a dataset with logic based on the location parameter
SELECT CASE #Location WHEN 'Paris' THEN GETDATE()+10
WHEN 'Berlin' THEN GETDATE()+11
WHEN 'New York' THEN GETDATE()+8
ELSE GETDATE() END as DefaultDate
Then set the date parameter default value to this dataset.
Unfortunately, SSRS does not refresh cascading parameters once they have been set. Other than reloading the report, the only way that I am aware of is to create a custom UI using the ReportViewerDialog.
I have found that if you use a stored procedure to render the child parameter, by passing in the parent selection, the dataset will get refreshed
I've been having the same issue, and realized it was a simple mistake causing this issue. Posting here for OP and anyone else searching for this issue.
You need to ensure that all parameters, in SSRS, are set to the correct value field, not the display field. You can replicate the cascading parameter issue that many have identified by simply selecting a "Name" field in the parameter default values instead of the "Value" field requested. This will populate the drop down correctly but nothing will be selected, and the cascade will stop. It may then appear as though the cascading parameters are not refreshing because of the Closed be Design issue.
In SSRS In Report Data tab, right click parameter and select
Parameter Properties.
Select Default Values.
Ensure that Value Field is set to the correct value for your sproc, not the value that you present to report users.

Default value to a data parameter , SSRS

In my SSRS report I wanted to default the date parameter with the execution date. I default the date patameter with =DateValue(Globals!ExecutionTime)
or =today. I do have 5 other parameters in my report.
In reporting manager, it makes the page refresh each time when I select another parameter value. Why is that? How do I solve this?
Hope this helps somebody still in need.
To avoid refreshes on changing parameters, avoid using expressions in the Parameter default values.
For example, instead of specifying =TODAY() expression, create a dataset with a SQL query such as SELECT getdate() = DefaultDate and from the parameter, refer to this dataset using query for your default value.
check these out:
http://blog.summitcloud.com/2009/12/fix-refresh-of-parameters-in-ssrs/
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/6e5c4137-092f-4d54-a1a1-27730744074d/
Hope it helps.