I have written a query for calculating total sum in one field but i could get total records. Let me share what i written. DEFINE VARIABLE I AS INTEGER NO-UNDO. FIND FIRST shth_pus_head WHERE shth_pus_head.push_id = "P0000078" NO-LOCK NO-ERROR. FOR EACH shtd_pus_det OF shth_pus_head NO-LOCK: i = i + 1. END. DISPLAY i. What i need is when i calculate total sum in qty column i want sum = 1560. (Note- qty column table field is shtd_pus_det.qty) Check the attached image Continue reading...