How to display multiple totals in one groupfooter?

Hi, I am currently creating a report that will display the totals, the item no.(s) and names of the “Sales Invoice Line”. My primary dataitem is “Item”, and obviously, my secondary dataitem is “Sales Invoice Line”. The grouptotal field is “Unit of Measure Code”, and the total field is “Quantity”. The user will be able to use the “Shipment Date” field to filter out certain sales invoice lines. I so far got this part working. When I tried to obtain the total of the “Quantity” field, using “Unit of Measure Code” as the grouptotal field in the “Sales Line”, and also the other “Sales Invoice Line” by defining them as two record variables, and put the following codes on the PreSection of the “Sales Invoice Line”‘s groupfooter, and I found out that it didn’t work (Note that I created 2 decimal variables for both “Quantity” fields (OpenOrderQty and Qty): SalesInvLine2.SETFILTER(Type,’%1’,TempSalesLine.Type::Item); SalesInvLine2.SETRANGE(“No.”,TempSalesLine.“No.”,“No.”); SalesInvLine2.SETFILTER(“UOM Type”,’<>%1’,SalesInvLine2.“UOM Type”::“Case”); SalesInvLine2.SETRANGE(“Shipment Date”,TempFrom,TempTo); IF SalesInvLine2.FIND(’-’) THEN REPEAT Qty := Qty + SalesInvLine2.Quantity; UNTIL SalesInvLine2.NEXT = 0; TempSalesLine2.SETFILTER(“Document Type”,’%1’,TempSalesLine.“Document Type”::Order); TempSalesLine2.SETFILTER(Type,’%1’,TempSalesLine.Type::Item); TempSalesLine2.SETRANGE(“No.”,TempSalesLine.“No.”,“No.”); TempSalesLine2.SETFILTER(“UOM Type”,’<>%1’,TempSalesLine2.“UOM Type”::“Case”); TempSalesLine2.SETRANGE(“Shipment Date”,FromShipDate,ToShipDate); IF TempSalesLine2.FIND(’-’) THEN REPEAT OpenOrderQty := CloseOrderQty + TempSalesLine2.Quantity; UNTIL TempSalesLine2.NEXT = 0; How do I get this resolved? Thanks in advance. Sincerely, Sylvia Tsang Management Software Solutions, Inc. Edited by - yummi on 2002 Mar 26 15:13:57

In the second set did you perhaps mean: OpenOrderQty := OpenOrderQty + TempSalesLine2.Quantity; Insted of: OpenOrderQty := CloseOrderQty + TempSalesLine2.Quantity; You also wish to consider building keys to increase the perfomance of the report. As it is written, the SalesInvLine2 portion will grow continually slower as the dabase grows in size. Also, you could then pair the new key with a Sub Index Field and insted of looping through all of the qualifying records you could set your filters then perform CALCSUMS on the field you wish to total. Bill Benefiel Manager of Information Systems Overhead Door Company (317) 842-7444 ext 117