Creating a report

sbilly
Member Posts: 231
I want to create a report that displays number of sales orders and the number of their sales lines for each customer, between tow dates ( posting date):
Like this:
Customers | No. Orders | No. Lines
Customer1 | 66 | 220
Customer2 | 1 | 5
Any ideas of the dispoition of data item?
Like this:
Customers | No. Orders | No. Lines
Customer1 | 66 | 220
Customer2 | 1 | 5
Any ideas of the dispoition of data item?
0
Comments
-
What did you try as of now and what problem you are facing..0
-
Take a dataitem of Customer and write it on onafterget trigger
Nooforder := 0; NoofLine := 0; SalesHeader.SETCURRENTKEY("Posting Date","Sell-to Customer No."); SalesHeader.SETRANGE("Posting Date",StartDate,EndDate); SalesHeader.SETRANGE("Sell-to Customer No.",Customer."No."); Nooforder := SalesHeader.Count; IF SalesHeader.FINDSET THEN REPEAT SalesLine.SETRANGE("Document Type",SalesHeader."Document Type"); SalesLine.SETRANGE("Document No.",SalesHeader."No."); NoofLine += SalesLine.Count; UNTIL SalesHeader.NEXT=0;
0 -
This's the disposition I tried:
DataItem Name
Customer <Customer>
Archived Sales Header <Archived Sales Header>
Archived Sales Line <Archived Sales Line>
I used the flowfield "No. Of Orders", but I have a problem with the Number of sales line.
My second problem is that I can't calculate the flowfield "No. Of Orders" depending on the posting date.0 -
You can add Posting date=FIELD(Date Filter) in No. Of Orders field calcformula..
What problem you have in Sales Lines?0 -
vijay_g wrote:Take a dataitem of Customer and write it on onafterget trigger
Nooforder := 0; NoofLine := 0; SalesHeader.SETCURRENTKEY("Posting Date","Sell-to Customer No."); SalesHeader.SETRANGE("Posting Date",StartDate,EndDate); SalesHeader.SETRANGE("Sell-to Customer No.",Customer."No."); Nooforder := SalesHeader.Count; IF SalesHeader.FINDSET THEN REPEAT SalesLine.SETRANGE("Document Type",SalesHeader."Document Type"); SalesLine.SETRANGE("Document No.",SalesHeader."No."); NoofLine += SalesLine.Count; UNTIL SalesHeader.NEXT=0;
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