Hi! I am trying to count records but can never get my totals right! I am trying to count records except for those whose RunTable.DebCred = P, but resetting at P or a new endpoint. The #PageCount used below counts the records and evaluates RunTable.DebCred in "D" and "C" and resets at P or a new endpoint.
Here is my formula:
EvaluateAfter ({#PageCount});
NumberVar PageCount;
If {RunTable.DebCred} = "P" Then
(PageCount := PageCount)
else
if (Previous({RunTable.Endpoint})) <>{RunTable.Endpoint}) then
(PageCount:= 1)
else
PageCount:= PageCount + 1 ;
PageCount;
I have this formula in the Details section beside the records to check it and discovered that the very first record of the report does not have a number beside it. My count starts on the second record. I have changed if RunTable.DebCred = P to reset PageCount := PageCount + 1 and then it will count the first record, but it screws up the rest of my counting. What can I do to correct this?
Thanks!
Here is my formula:
EvaluateAfter ({#PageCount});
NumberVar PageCount;
If {RunTable.DebCred} = "P" Then
(PageCount := PageCount)
else
if (Previous({RunTable.Endpoint})) <>{RunTable.Endpoint}) then
(PageCount:= 1)
else
PageCount:= PageCount + 1 ;
PageCount;
I have this formula in the Details section beside the records to check it and discovered that the very first record of the report does not have a number beside it. My count starts on the second record. I have changed if RunTable.DebCred = P to reset PageCount := PageCount + 1 and then it will count the first record, but it screws up the rest of my counting. What can I do to correct this?
Thanks!