Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

set default value of date paramter as getdate()-1 in SSRS report Expand / Collapse
Author
Message
Posted Thursday, April 12, 2012 4:54 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, April 02, 2014 8:22 AM
Points: 49, Visits: 297
Hi,

What is the expression to set the default date of date parameter to getdate()-1. I want the SSRS report to choose the Startdate as previous date and end date as current date.

I set the default value of parameter as =Today(), which displays current date, how to set it to previous date? Any ideas what should be the expression?

Thanks
Post #1282249
Posted Thursday, April 12, 2012 7:15 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 4:35 AM
Points: 12,208, Visits: 9,172
Try this:

=DateAdd("d",-1,Today())





How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1282350
Posted Thursday, April 12, 2012 7:22 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, April 02, 2014 8:22 AM
Points: 49, Visits: 297
Thanks. It worked.
Post #1282352
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse