Sales Price Report, group by Item No & UoM

amphysvena
Member Posts: 113
Hi,
I try to make a simple report. Only using 1 data item Sales Price. set tableview using the first key : Item No.,Sales Type,Sales Code,Starting Date,Currency Code,Variant Code,Unit of Measure Code,Minimum Quantity.
Set the GroupTotalFields : Item No.,Unit of Measure Code.
Create two GroupHeader, GroupHeader(1) & GroupHeader(2).
GroupHeader(1) to show item no. On PreSection put this code :
CurrReport.SHOWOUTPUT(CurrReport.TOTALSCAUSEDBY = FIELDNO("Item No."));
GroupHeader(2) to show Unit of Measure COde. On PreSection put this code :
CurrReport.SHOWOUTPUT(CurrReport.TOTALSCAUSEDBY = FIELDNO("Unit of Measure Code"));
Then on Sales Price Body, shows the Sales Code (Customer Code in my database)
I'm expecting the report will show like this:
ITEM1
======================
KG
CUST1
CUST2
PCS
CUST3
But instead, the report shows like this:
ITEM1
======================
KG
CUST1
KG
CUST2
PCS
CUST3
Any mistake on my code? thanks
Regards,
Alphonse
I try to make a simple report. Only using 1 data item Sales Price. set tableview using the first key : Item No.,Sales Type,Sales Code,Starting Date,Currency Code,Variant Code,Unit of Measure Code,Minimum Quantity.
Set the GroupTotalFields : Item No.,Unit of Measure Code.
Create two GroupHeader, GroupHeader(1) & GroupHeader(2).
GroupHeader(1) to show item no. On PreSection put this code :
CurrReport.SHOWOUTPUT(CurrReport.TOTALSCAUSEDBY = FIELDNO("Item No."));
GroupHeader(2) to show Unit of Measure COde. On PreSection put this code :
CurrReport.SHOWOUTPUT(CurrReport.TOTALSCAUSEDBY = FIELDNO("Unit of Measure Code"));
Then on Sales Price Body, shows the Sales Code (Customer Code in my database)
I'm expecting the report will show like this:
ITEM1
======================
KG
CUST1
CUST2
PCS
CUST3
But instead, the report shows like this:
ITEM1
======================
KG
CUST1
KG
CUST2
PCS
CUST3
Any mistake on my code? thanks
Regards,
Alphonse
0
Answers
-
Hi,
What is the problem with the report?
I suspect that the break on the item is ok but not the UOM. This is because of the key as it is sorting by item (this is ok) then a number of fields eg starting date then UOM. So from you example you have two item "KG" and on "PCS" - if the "PCS" has a starting date between the two "KG" item then you will get three breaks.
You will need to create a key with Item no.,UOM.0 -
OK, So the key between Item No. & Unit of measure code, effecting the break.
It is solve the problem if I create new key (Item No., Unit of measure code).
I always thought it only effected by the sequence in the key selected. So no need to create new key.
Thanks for the reply Dave.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