Link to home
Start Free TrialLog in
Avatar of cindyfiller
cindyfillerFlag for United States of America

asked on

set parameter to current date on SSRS report server (not bids)

It took me quite a while to set up a series of snapshots on the report server so I don't want to redo them if possible.  I found that the end date for these snapshots had the incorrect date.  I need the end date to be today's date.  When I'm working in Bids I can easily change it to today().  But changing it in Bids and then republishing it does not affect the snapshots and the snapshot must have a static parameter.  I tried to just enter today() or several other variations and it won't accept those in the parameters on the report server.  Is there a way around this?  

When I try today() or any other option that provides todays date I get the following error:  The value provided for the report parameter 'EndDate' is not valid for its type
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

please clarify: what date(s) do you expect to see in, A n example, the 1  week old SSRS report snapshots?
it looks like all is working as it should
Avatar of cindyfiller

ASKER

I have the StartDate set for 7/1/15 which is good.  I want the end date to be what ever today's date is.  Right now the end date is 6/30/16 and that is wrong,
is it  for a new (today's)  snapshot?
what is your SSRS version?

try to use
EndDate dataset using this Sql server query "Select GetDate() as CurrentDate"

and add this expression into the report textbox ="EndDate:" + " " + First(Fields!Now.Value, "EndDate")


also check this example

Working with Report Snapshots in SQL Server Reporting Services SSRS
https://www.mssqltips.com/sqlservertip/1922/working-with-report-snapshots-in-sql-server-reporting-services-ssrs/
Thank you for the article.  It seemed to be more about creating the snapshot and I've already done that.  And I have no problem changing the parameter to use today's date.  That works fine whether I'm in Bids or if I am running the report myself.  The issue is that the static parameter in the current snapshots has 6/30/16.  It won't let me change it to todays date in any way.  Changing it in Bids does not affect the current parms on the snapshots.  Right now the only work around I've found is to recreate the snapshots and that takes me hours.  I was hoping to find a way to change the parm on the snapshot itself...  

I have sql 2008 R2.
just to be clear: after you published report and set it to create snapshots at specific date\time

Do you see  the "right" date time for 'EndDate'?

let say - do you see  the above example as a way to simulate your issue?
SOLUTION
Avatar of cindyfiller
cindyfiller
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I didn't give myself any points.  In reality I realized that I won't be able to make the change to that snapshot and I'll have to recreate it.  His comment pretty much summarized this realization but my comment provided more data.