I have a report that is looking at table.details and showing a starttime or endtime based on criteria in the formula. Here are the formulas.
@startime
WhilePrintingRecords;
DateTimeVar BeginDate;
if
{table.Details.Action ID} = "HD_FRWD_GROUP" then
BeginDate :={table.Details.Date};
@endtime
WhilePrintingRecords;
DateTimeVar EndDate;
if
table.Details.Action ID} = "HD_FRWD_STAFF" then
EndDate := {table.Details.Date};
Here is a copy of the details section:
Startime EndTime Action ID
HD_OPEN
HD_TAKEN
START_CLOCK
2/23/2010 6:42:30 PM HD_FRWD_GROUP
2/24/2010 6:57:28 AM HD_FRWD_STAFF
HD_STATUSCHA
HD_CLOSE
Is there anyway to make the starttime and endtime line up or have the blank spaces suppressed based on Action Id so I can export this to Excel to calculate work hours between the two dates. I tried calculating the work hours in Crystal but I get an error in the formula for @workhours "This Formula Can not be used because it must be evalulated later" when I try using my @starttime and @endtime formulas. Any help would be appreciated.
CLK
@startime
WhilePrintingRecords;
DateTimeVar BeginDate;
if
{table.Details.Action ID} = "HD_FRWD_GROUP" then
BeginDate :={table.Details.Date};
@endtime
WhilePrintingRecords;
DateTimeVar EndDate;
if
table.Details.Action ID} = "HD_FRWD_STAFF" then
EndDate := {table.Details.Date};
Here is a copy of the details section:
Startime EndTime Action ID
HD_OPEN
HD_TAKEN
START_CLOCK
2/23/2010 6:42:30 PM HD_FRWD_GROUP
2/24/2010 6:57:28 AM HD_FRWD_STAFF
HD_STATUSCHA
HD_CLOSE
Is there anyway to make the starttime and endtime line up or have the blank spaces suppressed based on Action Id so I can export this to Excel to calculate work hours between the two dates. I tried calculating the work hours in Crystal but I get an error in the formula for @workhours "This Formula Can not be used because it must be evalulated later" when I try using my @starttime and @endtime formulas. Any help would be appreciated.
CLK