Default value to a data parameter , SSRS - date

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.

Related

SSRS Report Date Parameter Readonly

Nonreadable(Readonly-Can not change the date value) date parameter is possible in SSRS Report?
Thank you in advance.
Make a dataset that returns your desired date. Set the parameter's query dataset to take values from that dataset - i.e. there is only one date that can be selected. Make the parameter's default value be the value from that dataset. Uncheck "Allow null value".
The parameter now shows the desired date and can't be changed.

how to avoid cascading in ssas parameters in ssrs report and load default "all" when report loads?

i have a ssrs report which uses ssas data source and all of the parameter in report also come from ssas data source. the problem is parameters are acting as cascading parameters. i can not have values in parameter drop-down until i select parameter from previous drop-down.
i wanted to have default value "All" selected when report loads instead of waiting for selecting first parameter and then load subsequent?
i have removed #parameters from parameter data source and now here is how my MDX looks like:
WITH MEMBER
[Measures].[ParameterCaption] AS [Category].[Category ID].CURRENTMEMBER.MEMBER_CAPTION MEMBER
[Measures].[ParameterValue] AS [Category].[Category ID].CURRENTMEMBER.UNIQUENAME MEMBER
[Measures].[ParameterLevel] AS [Category].[Category ID].CURRENTMEMBER.LEVEL.ORDINAL
SELECT
{
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
} ON COLUMNS ,
[Category].[Category ID].ALLMEMBERS
ON ROWS FROM
( SELECT ( [OwningEntity].[Entity ID] )
ON COLUMNS FROM
( SELECT ( [Organization].[Organization] ) ON COLUMNS FROM [PerformanceScores]
))
Create Additional data source , point your first parameter with default value "from query" to that data source - This parameter need to be on the top of the list as in SSRS order of parameters is important.
- Let me know if you got any problems.
Thanks
Daniel
Create hidden parameter with IIF statement in default value.
in IIF put dummy date - this will not execute the report but will fill all the other parameters.
IIF(yourparameter.value="",dummydate.value,yourparameter.value)
Use this hidden parameter as your "Main" data range but default value will depend on visible parameter value in IIF statement when user can choose the range
This should work...

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.

How to incorporate the use of SSRS Dataset parameters with Timestamp escape clause?

I've the following WHERE CLAUSE of a SQL Query String in the SSRS Dataset:
WHERE "Input_date" >={ts '2009-01-01'}
AND "Input_date" < {ts '2009-12-31'}
And now, I'd like to use report parameter to wrap up the dates in the SQL statement, i.e.
#indate1, and #indate2.
I've tried this, but error occurs:
WHERE "Input_date" >={ts #indate1}
AND "Input_date" < {ts #indate2}
Please kindly advise.
Thanks.
What have you done to add these parameters? I assume that you have altered the dataset query with the changes you have posted in your question. There are two more steps you need to perform to make this work:
Define a new parameter to the parameters folder. Right click the parameters folder and choose Add parameter. Specify which values you want the user to be able to select. Repeat for the second parameter.
Add the parameters to the dataset you are using for the report. This can be done in the parameters section when you edit the dataset. Add two parameters with the names #indate1 and #indate2, and set each parameters value to the parameters you defined in step one.
Alter the SQL statement as you described in your post. I would think that your SQL should look something like this (assuming Input_date is a column in your table):
WHERE Input_date >= #indate1 AND Input_date < #indate2
This is specific to the BIDS 2008 version of Visual Studio. If you are using report builder or something else, please let me know, and I can change the instructions a bit.