I have a report with 2 parameters, @startdate
and @enddate
, which are date/time format. When the report runs, you choose the date from a calendar. I deploy the report to report server running SQL Server 2012 Report Server.
I've now set default values for the two parameters, as I want to set the range to be the beginning of this year to today. I set the default values as follows in the parameter properties in Visual Studio, using "specify values":
@startdate
is set as 01/02/2013 00:00:00
@enddate
is set as an expression =today()
When I preview the report locally in Visual Studio, it correctly fills the two parameters as I would expect. I deploy to the report server, and go in to Report Manager to create a subscription, but it doesn't have a "use default" next to the startdate
parameter box. I also notice that the enddate
parameter box has "use default" selected, but this and the input box are greyed out.
At first I thought it was an issue with the subscription set up, but when I run the deployed report from the report manager (and from a sharepoint page), it doesn't use my default value for the start date, and it is not until I choose a start date manually that it sets the enddate to today's date.
I can use an expression to return a specific date as a workaround, but my question here is why does the deployed report not recognise this default parameter when the locally run report does recognise it?
=DateValue("February 01 2013")
– laurencemadill