Click here to Skip to main content
15,905,682 members
Home / Discussions / Database
   

Database

 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Wendelius14-Nov-08 9:36
mentorWendelius14-Nov-08 9:36 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Mike Devenney14-Nov-08 9:38
Mike Devenney14-Nov-08 9:38 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Wendelius14-Nov-08 9:55
mentorWendelius14-Nov-08 9:55 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Mike Devenney14-Nov-08 10:01
Mike Devenney14-Nov-08 10:01 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Wendelius14-Nov-08 10:12
mentorWendelius14-Nov-08 10:12 
AnswerRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Alexandru Serban30-Dec-09 9:08
professionalAlexandru Serban30-Dec-09 9:08 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
RichardSouthworth14-Jan-10 2:02
RichardSouthworth14-Jan-10 2:02 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
Alexandru Serban14-Jan-10 5:03
professionalAlexandru Serban14-Jan-10 5:03 
A simpler solution is to add a hidden boolean parameter to the report, called for example 'IsSubscription' with a default value of false and add the folowing expression to the StartDate and EndDate default values:

=IIf(Parameters!IsSubscription.Value, DateAdd("d",-1,Today()), Today())

When running the report normally, the IsSubscription parameter is defaulted to false and the default date is today.
When creating the subscription, the IsSubscription parameter must is set to true, thus setting the default value to today-1 = yesterday.

This solution can be aplied to do all kinds of changes based on the IsSubscription parameter value and expresions for the rest of the paremeters based on its value.

The IsSubscription parameter must be defined before any other parameter that uses its value (moved up in the parameter list).
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
XavierSteel1-Feb-10 13:49
XavierSteel1-Feb-10 13:49 
GeneralRe: Creating a dynamic date parameter in a SQL Reporting Services subscription Pin
BStanneveld19-Jul-11 19:24
BStanneveld19-Jul-11 19:24 
QuestionCursor problem [solved/please ignore] Pin
leckey14-Nov-08 6:02
leckey14-Nov-08 6:02 
AnswerRe: Cursor problem Pin
Paddy Boyd14-Nov-08 6:08
Paddy Boyd14-Nov-08 6:08 
GeneralRe: Cursor problem Pin
leckey14-Nov-08 6:09
leckey14-Nov-08 6:09 
GeneralRe: Cursor problem Pin
Paddy Boyd14-Nov-08 6:11
Paddy Boyd14-Nov-08 6:11 
GeneralRe: Cursor problem Pin
leckey14-Nov-08 6:14
leckey14-Nov-08 6:14 
QuestionTwo Transactions in Stored Proc Pin
indian14314-Nov-08 5:16
indian14314-Nov-08 5:16 
AnswerRe: Two Transactions in Stored Proc Pin
dan!sh 14-Nov-08 5:28
professional dan!sh 14-Nov-08 5:28 
GeneralRe: Two Transactions in Stored Proc Pin
indian14314-Nov-08 5:45
indian14314-Nov-08 5:45 
GeneralRe: Two Transactions in Stored Proc Pin
dan!sh 14-Nov-08 7:22
professional dan!sh 14-Nov-08 7:22 
AnswerRe: Two Transactions in Stored Proc Pin
ToddHileHoffer14-Nov-08 5:31
ToddHileHoffer14-Nov-08 5:31 
GeneralRe: Two Transactions in Stored Proc Pin
indian14314-Nov-08 5:55
indian14314-Nov-08 5:55 
GeneralRe: Two Transactions in Stored Proc Pin
ToddHileHoffer14-Nov-08 5:57
ToddHileHoffer14-Nov-08 5:57 
QuestionIn sql service reports Pin
member2714-Nov-08 4:19
member2714-Nov-08 4:19 
AnswerRe: In sql service reports Pin
Paddy Boyd14-Nov-08 5:44
Paddy Boyd14-Nov-08 5:44 
GeneralRe: In sql service reports Pin
member2714-Nov-08 20:18
member2714-Nov-08 20:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.