In XI, I have a command parameter set to date but when I try to run the report, I get an error must be date time format. I don't understand why this is happening or where to look to resolve the issue.
Here is my formula. I get the error message on Month(Date({?StartDate}))
This is the last thing I have to resolve before I can say this report is done....Thanks in advance. lhuffst
Here is my formula. I get the error message on Month(Date({?StartDate}))
This is the last thing I have to resolve before I can say this report is done....Thanks in advance. lhuffst
Code:
WhilePrintingRecords;
Global DateVar Start;
Global DateVar End;
Local NumberVar Weeks;
Local NumberVar Days;
Local Numbervar Hol;
Global Numbervar TotDays;
Local Numbervar MonthNum;
Local NumberVar Weds;
Shared DateTimeVar Array Holidays;
If Month({Command.MYDATE}) = 01 Then
If Month({Command.MYDATE}) = Month(Date({?StartDate})) and
Month({Command.MYDATE}) = Month(Date({?EndDate})) then
(
Start := Date({?StartDate});
End := Date({?EndDate})
)
else
(
Start := Date(Year({?StartDate}),01,01);
End := Date(Year({?EndDate}),01,31)
)