I have a parameter named {?EndDate}
when i run the report i want it to set it the current date as its default value, so that the value of {?EndDate} will be the day that report is run. Is it possible?
If you only want the value to be currentdate when no other enddate is chosen, then set up a default value that is out of range, e.g., 9/9/9999, with prompt text that states that if 9/9/9999 is selected the end date will be the currentdate. Then use a selection formula like:
(
(
{?Enddate} <> date(9999,9,9) and
{table.date} < {?Enddate} + 1
) or
(
{?Enddate} = date(9999,9,9) and
{table.date} < currentdate + 1
)
)
hi LB
Thank you for your response.
It works perfect.
What if i have a parameter {?StartDate} and i want it to set it as default i.e {?EndDate}-1 or a day before CurrentDate? How the Selection Formula looks like?
The following should either accept the selected start date or if 9/9/9999 is selected, it would default to >= the value of the end date (the selected date or current date) - 1:
(
(
{?StartDate} <> date(9999,9,9) and
{table.date} >= {?StartDate}
) or
(
{?StartDate} = date(9999,9,9) and
(
{?EndDate} <> date(9999,9,9) and
{table.date} >= {?EndDate} - 1
) or
(
{?EndDate = date(9999,9,9) and
{table.date} >= currentdate -1
)
)
) and
(
(
{?Enddate} <> date(9999,9,9) and
{table.date} < {?Enddate} + 1
) or
(
{?Enddate} = date(9999,9,9) and
{table.date} < currentdate + 1
)
)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.