Hello,
I have a report with 3 parameters such as startdate, enddate and country
When the user set the startdate and enddate as null and entering only country then
I want to display the startdate and enddate as yesterday's date and for this I created a formula as follows and if enddate is null then it should display enddate as today's:
if isnull({?@STARTDATE}) and isnull({?@ENDDATE}) then
"Batch Date Range: " + totext(Date(DateAdd("d",-1,CurrentDate))) + " thru " + totext(Date(DateAdd("d",-1,CurrentDate)))
else if isnull({?@ENDDATE}) then
"Batch Date Range: " + totext(Date({?@StartDate})) + " thru " + ToText(CurrentDate)
else
"Batch Date Range: " + totext(Date({?@StartDate})) + " thru " + totext(Date({?@EndDate}))
But when both startdate and enddate are nulls then my formula is not displaying yesterday's date. And I have this formula in Page Header section.
Any ideas?
Thank You!
I have a report with 3 parameters such as startdate, enddate and country
When the user set the startdate and enddate as null and entering only country then
I want to display the startdate and enddate as yesterday's date and for this I created a formula as follows and if enddate is null then it should display enddate as today's:
if isnull({?@STARTDATE}) and isnull({?@ENDDATE}) then
"Batch Date Range: " + totext(Date(DateAdd("d",-1,CurrentDate))) + " thru " + totext(Date(DateAdd("d",-1,CurrentDate)))
else if isnull({?@ENDDATE}) then
"Batch Date Range: " + totext(Date({?@StartDate})) + " thru " + ToText(CurrentDate)
else
"Batch Date Range: " + totext(Date({?@StartDate})) + " thru " + totext(Date({?@EndDate}))
But when both startdate and enddate are nulls then my formula is not displaying yesterday's date. And I have this formula in Page Header section.
Any ideas?
Thank You!