How to display multiple totals in one section of the report?

yummi
Member Posts: 2
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>
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>
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions