Hi,
I have a report that contains date parameters:
"begin date" and "end date"
The user can choose the range that he wants the report to use.
I am trying to limit the number of days that the user
can choose because this is a very large report and they
always choose to run it for at least 6 months at a time.
I am having to do this because they won't run it in one or
two month increments.
Anyway, I need to limit the search date range to 3 months.
If the range that the user puts in is over 3 months, then
I want to only return records from the beginning date that
he chose 3 months forward, otherwise just use the dates
that he chose.
This is the formula I'm trying to use:
if DateDiff("d",{?End Date},{?Begin Date}) > 95
then
DateAdd("d",95,{?Begin Date})
else
use the original choices of {?Begin Date},{?End Date}
I'm not sure the syntax to put after the "else" clause.
Also, I don't have any idea where to put this formula.
I tried it in the record selection but I already have a
lot going on in that and it didn't like the syntax.
Any help would be appreciated!
Thanks,
Rory
I have a report that contains date parameters:
"begin date" and "end date"
The user can choose the range that he wants the report to use.
I am trying to limit the number of days that the user
can choose because this is a very large report and they
always choose to run it for at least 6 months at a time.
I am having to do this because they won't run it in one or
two month increments.
Anyway, I need to limit the search date range to 3 months.
If the range that the user puts in is over 3 months, then
I want to only return records from the beginning date that
he chose 3 months forward, otherwise just use the dates
that he chose.
This is the formula I'm trying to use:
if DateDiff("d",{?End Date},{?Begin Date}) > 95
then
DateAdd("d",95,{?Begin Date})
else
use the original choices of {?Begin Date},{?End Date}
I'm not sure the syntax to put after the "else" clause.
Also, I don't have any idea where to put this formula.
I tried it in the record selection but I already have a
lot going on in that and it didn't like the syntax.
Any help would be appreciated!
Thanks,
Rory