Using Visual Cut I am executing a Crystal XI report extracting from an SQL 2000 DB. Today I am using the following formula to capture specific date ranges of activity. Please note that the report is executed programmatically via Visual Cut on Monday through Friday.
if {@Day of the Week} = 2 //Monday
then ({Command.CREATEDATE} in PrintDate -3)
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
else ({Command.CREATEDATE} in PrintDate -1)//Tuesday, Wednesday, Thursday, Friday
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
I have the need to add additional criteria yet I am stuck.
On Monday I want to include activity from Friday after the “@EnterCutoffTime” formula and through but prior to the “@EnterCutoffTime” on PrintDate. Then on Tuesday – Friday, activity from the previous business day, and after “@EnterCutoffTime” formula, and through but prior to the “@EnterCutoffTime” on PrintDate.
If I would write this the way I think it should be written I would do the following;
if {@Day of the Week} = 2 //Monday
then ({Command.CREATEDATE} in PrintDate -3)
and Ctime({Command.CREATEDATE})>={@EnterCutoffTime}
to ({Command.CREATEDATE} in PrintDate)
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
else ({Command.CREATEDATE} in PrintDate -1)//Tuesday, Wednesday, Thursday, Friday
and Ctime({Command.CREATEDATE})>={@EnterCutoffTime}
to ({Command.CREATEDATE} in PrintDate)
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
Won't work, the error message is "a time is required here" and it highlights the first ({Command.CREATEDATE} in PrintDate) in the formula.
if {@Day of the Week} = 2 //Monday
then ({Command.CREATEDATE} in PrintDate -3)
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
else ({Command.CREATEDATE} in PrintDate -1)//Tuesday, Wednesday, Thursday, Friday
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
I have the need to add additional criteria yet I am stuck.
On Monday I want to include activity from Friday after the “@EnterCutoffTime” formula and through but prior to the “@EnterCutoffTime” on PrintDate. Then on Tuesday – Friday, activity from the previous business day, and after “@EnterCutoffTime” formula, and through but prior to the “@EnterCutoffTime” on PrintDate.
If I would write this the way I think it should be written I would do the following;
if {@Day of the Week} = 2 //Monday
then ({Command.CREATEDATE} in PrintDate -3)
and Ctime({Command.CREATEDATE})>={@EnterCutoffTime}
to ({Command.CREATEDATE} in PrintDate)
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
else ({Command.CREATEDATE} in PrintDate -1)//Tuesday, Wednesday, Thursday, Friday
and Ctime({Command.CREATEDATE})>={@EnterCutoffTime}
to ({Command.CREATEDATE} in PrintDate)
and Ctime({Command.CREATEDATE})<={@EnterCutoffTime}
Won't work, the error message is "a time is required here" and it highlights the first ({Command.CREATEDATE} in PrintDate) in the formula.