I have created the following two parameters:
DateRange Parameter with available values:
1. label = today, value = 1
2. label = yesterday, value = 2
StartDate with Default Value (Non Queried) = =
iif(Parameters!PMDateRange.Value = "1",
now(),
iif(Parameters!PMDateRange.Value = "2",
Today.AddDays(-1),
nothing))
The idea is that the user selects a daterange parameter and that the
startdate parameter is populated accordingly, the user must still have the
ability to manually override the start date if desired.
When I run the report I get the following error message.
he value expression for the report parameter â'PMStartDateâ' contains an
error: [BC30654] 'Return' statement in a Function or a Get must return a
value.The way I have implemented this is by creating another dataset like
(although against oracle)
select sysdate-1 as Yesterday, sysdate as Today from dual
and use this dataset in the default section of the parameter as 'Queried'..
the user can change the dates if needed..
Hope this helps..
"SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
news:D74138F5-D842-4AB8-82E9-5CCB4315AA90@.microsoft.com...
> I have created the following two parameters:
> DateRange Parameter with available values:
> 1. label = today, value = 1
> 2. label = yesterday, value = 2
> StartDate with Default Value (Non Queried) = => iif(Parameters!PMDateRange.Value = "1",
> now(),
> iif(Parameters!PMDateRange.Value = "2",
> Today.AddDays(-1),
> nothing))
> The idea is that the user selects a daterange parameter and that the
> startdate parameter is populated accordingly, the user must still have the
> ability to manually override the start date if desired.
> When I run the report I get the following error message.
> he value expression for the report parameter 'PMStartDate' contains an
> error: [BC30654] 'Return' statement in a Function or a Get must return a
> value.|||Thanks RK but its not quite what I am looking for. Does anyone have any other
ideas?
PLEASE!!!
"RK Balaji" wrote:
> The way I have implemented this is by creating another dataset like
> (although against oracle)
> select sysdate-1 as Yesterday, sysdate as Today from dual
> and use this dataset in the default section of the parameter as 'Queried'..
> the user can change the dates if needed..
> Hope this helps..
> "SAcanuck" <SAcanuck@.discussions.microsoft.com> wrote in message
> news:D74138F5-D842-4AB8-82E9-5CCB4315AA90@.microsoft.com...
> > I have created the following two parameters:
> >
> > DateRange Parameter with available values:
> > 1. label = today, value = 1
> > 2. label = yesterday, value = 2
> >
> > StartDate with Default Value (Non Queried) = => >
> > iif(Parameters!PMDateRange.Value = "1",
> > now(),
> > iif(Parameters!PMDateRange.Value = "2",
> > Today.AddDays(-1),
> > nothing))
> >
> > The idea is that the user selects a daterange parameter and that the
> > startdate parameter is populated accordingly, the user must still have the
> > ability to manually override the start date if desired.
> >
> > When I run the report I get the following error message.
> >
> > he value expression for the report parameter 'PMStartDate' contains an
> > error: [BC30654] 'Return' statement in a Function or a Get must return a
> > value.
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment