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

Report subscription with Sysdate as default Parameter Expand / Collapse
Author
Message
Posted Tuesday, June 24, 2008 2:08 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 25, 2009 8:20 PM
Points: 1, Visits: 10
We are trying to create a report subscription and the report has a date parameter. Instead of hard coding the value, we want to use sysdate as default while creating the subscription.

the report will run daily based on sysdate and produce output.

We can do it in the report, but is there a way to specify sysdate as default parameter on subscription page?

Any help is appreciated..
Post #522874
Posted Wednesday, June 25, 2008 7:50 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 7:04 AM
Points: 3,670, Visits: 72,433
Are you using stored procedures?

Try something like this if you are

create procedure showdate
@inputdate datetime = '01/01/9999'
as
if @inputdate = '01/01/9999' set @inputdate = getdate()
select @inputdate





--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #523338
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse