angel7170
asked on
NEXT and ONLASTRECORD Function in Crytsal Reports
Hello,
I am using the formulas to do a count based on the condition below. The issue is on the last record, if the condition is true, it displays nothing on the detail section and at the group footer it doesn't count the last record. I undersatand it is because I am using "Next" in my formula. What should I do get the last record counted when the condition is true. please assist
I am using the formulas to do a count based on the condition below. The issue is on the last record, if the condition is true, it displays nothing on the detail section and at the group footer it doesn't count the last record. I undersatand it is because I am using "Next" in my formula. What should I do get the last record counted when the condition is true. please assist
@Count NPC Resolved
WhilePrintingRecords;
Global NumberVar TotalNPC;
if {HPD_Search_Assignment_Logs.Assigned_Group} = "NPC"
and {HPD_Search_Assignment_Logs.Status} in ["Resolved", "Closed"] and
{HPD_Search_Assignment_Logs.Incident_Number} <> next ({HPD_Search_Assignment_Logs.Incident_Number})
then
(
TotalNPC := TotalNPC + 1;
TotalNPC
)
@ Count NPC Resolved Reset
WhilePrintingRecords;
Global NumberVar TotalNPC:= 0;
@Count NPC Resolved Footer
WhilePrintingRecords;
Global NumberVar TotalNPC;
If TotalNPC = 0 then
0
else
TotalNPC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you mlmcc. It worked.
"TotalNPC := TotalNPC + 1;"
Are you saying that you will always want to count the last record or are there still conditions that must apply?