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
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 2:49 AM
Points: 50, Visits: 304
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: Thursday, December 18, 2014 12:52 PM
Points: 13,636, Visits: 11,509
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
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 2:49 AM
Points: 50, Visits: 304
Thanks. It worked.
Post #1282352
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse