Using Crystal 8.0
I have a formula that I use in two reports. It works fine in one report, and sporadically in the other. Here is the formula:
***Planned_Select****************************
evaluateafter({@Report_Initialize}) <----Where stWO_Plan = ""
global stWO_Plan as string
if ({A_WPOPERATION.ERECTIMESTAMP} in minimum({?Date Parameter}) to maximum({?Date Parameter})) and ({A_WORKORDER.WONUM}<> stWO_Plan) then
formula = 1
stWO_Plan = {A_WORKORDER.WONUM}
else
formula = 0
end if
The report's recordset is ordered by hierarchy, location, worknumber, and timestamp. The logic here is that it returns 1 for each of the FIRST workorder records it encounters that falls within the date range. This formula field is placed in the detail section of the report, and summed for sub-totals and Grand-Total.
The locations are arranged in a hierarchy. If I choose to run the report high in the hierarchy, everything is returned correctly. If I choose lower down in the hierarchy, it may miss some, especially if there is only one workorder (but multiple records).
I have tested it and I know the formula is being called. For some reason it does not recoginze any record as satisfying the criteria, yet clearly there are.
Any ideas?
I have a formula that I use in two reports. It works fine in one report, and sporadically in the other. Here is the formula:
***Planned_Select****************************
evaluateafter({@Report_Initialize}) <----Where stWO_Plan = ""
global stWO_Plan as string
if ({A_WPOPERATION.ERECTIMESTAMP} in minimum({?Date Parameter}) to maximum({?Date Parameter})) and ({A_WORKORDER.WONUM}<> stWO_Plan) then
formula = 1
stWO_Plan = {A_WORKORDER.WONUM}
else
formula = 0
end if
The report's recordset is ordered by hierarchy, location, worknumber, and timestamp. The logic here is that it returns 1 for each of the FIRST workorder records it encounters that falls within the date range. This formula field is placed in the detail section of the report, and summed for sub-totals and Grand-Total.
The locations are arranged in a hierarchy. If I choose to run the report high in the hierarchy, everything is returned correctly. If I choose lower down in the hierarchy, it may miss some, especially if there is only one workorder (but multiple records).
I have tested it and I know the formula is being called. For some reason it does not recoginze any record as satisfying the criteria, yet clearly there are.
Any ideas?