Hi,
Crystal Reports XI (BOXI)
Sql Server 2000
I am creating a formula to handle Daylight Savings Time changes.
To that end, I have created a DateTime range array that contains the datetime start and datetime end of each year's daylight savings time.
This is what it looks like:
Shared DateTimeVar Range Array CHANGE_ORDER_DST :=
[DateTimeValue (2001,04,01,02,00,00) to DateTimeValue (2001,10,28,02,00,00),
DateTimeValue (2002,04,07,02,00,00) to DateTimeValue (2002,10,27,02,00,00),
DateTimeValue (2003,04,06,02,00,00) to DateTimeValue (2003,10,26,02,00,00),
DateTimeValue (2004,04,04,02,00,00) to DateTimeValue (2004,10,31,02,00,00),
DateTimeValue (2005,04,03,02,00,00) to DateTimeValue (2005,10,30,02,00,00),
DateTimeValue (2006,04,02,02,00,00) to DateTimeValue (2006,10,29,02,00,00)];
Next I check the date fields in the report to see if they are in the date range...
If ({@Change Order Open} in CHANGE_ORDER_DST then do this
else
If ({@Change Order Close} in CHANGE_ORDER_DST then
do that
I noticed that the formula gives the correct date on the first field checked, but each field after that keeps the value of the first one. I saw in another thread that you should initialize the variable to zero and put it in the group heading.
I created a formula:
whileprintingrecords;
Shared DateTimeVar Range Array CHANGE_ORDER_DST := ;
But when I check it, it tells me that I need to use a date time array after the :=
I have tried (0000,00,00,00,00,00), 0, Null, "" etc. and
cannot get the checker (x+2) to accept it.
Does anyone know the correct syntax for this?
Thank you very much,
Rory
Crystal Reports XI (BOXI)
Sql Server 2000
I am creating a formula to handle Daylight Savings Time changes.
To that end, I have created a DateTime range array that contains the datetime start and datetime end of each year's daylight savings time.
This is what it looks like:
Shared DateTimeVar Range Array CHANGE_ORDER_DST :=
[DateTimeValue (2001,04,01,02,00,00) to DateTimeValue (2001,10,28,02,00,00),
DateTimeValue (2002,04,07,02,00,00) to DateTimeValue (2002,10,27,02,00,00),
DateTimeValue (2003,04,06,02,00,00) to DateTimeValue (2003,10,26,02,00,00),
DateTimeValue (2004,04,04,02,00,00) to DateTimeValue (2004,10,31,02,00,00),
DateTimeValue (2005,04,03,02,00,00) to DateTimeValue (2005,10,30,02,00,00),
DateTimeValue (2006,04,02,02,00,00) to DateTimeValue (2006,10,29,02,00,00)];
Next I check the date fields in the report to see if they are in the date range...
If ({@Change Order Open} in CHANGE_ORDER_DST then do this
else
If ({@Change Order Close} in CHANGE_ORDER_DST then
do that
I noticed that the formula gives the correct date on the first field checked, but each field after that keeps the value of the first one. I saw in another thread that you should initialize the variable to zero and put it in the group heading.
I created a formula:
whileprintingrecords;
Shared DateTimeVar Range Array CHANGE_ORDER_DST := ;
But when I check it, it tells me that I need to use a date time array after the :=
I have tried (0000,00,00,00,00,00), 0, Null, "" etc. and
cannot get the checker (x+2) to accept it.
Does anyone know the correct syntax for this?
Thank you very much,
Rory