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,
Sylvia Tsang
stsang@mgmtsoftware.com
Management Software Solutions, Inc.
<small>[ 25-03-2002, 18:43: Message edited by: yummi ]</small>
Sincerely,
Sylvia Tsang
stsang@mgmtsoftware.com
Management Software Solutions, Inc.