"List of products bought by customer between dates"

boby
Member Posts: 78
Hello,
For statistics purpose, I create a table with datas from an old accountancy program. I'm asked to do a form (not a report) to list the products a customer bought from a certain date.
The table looks like "sales line" and is made of line combining customer code and product code (a line by product sold to this customer in an invoice), and the form have to list subtotals by product..
In fact, I really don't know how to list that way (the "distinct" clause in SQL). Thanks for your suggestions or tips
For statistics purpose, I create a table with datas from an old accountancy program. I'm asked to do a form (not a report) to list the products a customer bought from a certain date.
The table looks like "sales line" and is made of line combining customer code and product code (a line by product sold to this customer in an invoice), and the form have to list subtotals by product..
In fact, I really don't know how to list that way (the "distinct" clause in SQL). Thanks for your suggestions or tips

0
Comments
-
This is close to impossible. I'd suggest to convice the customer to have a report, or an Excel query tru ODBC.
Do It Yourself is they key. Standard code might work - your code surely works.0 -
Ah, the magic of FlowFields:
You have a Customer/Product Details table. You need another table, let's call it "Customer/Product Summary", with the following fields:
-- Customer No.
-- Product No.
-- Date Filter (FlowFilter field)
-- Total Qty (Flowfield Sum of Quantity field in Details table)
-- Total Amount (Flowfield Sum of Amount field in Details table)
Populate this table with the unique combinations of Customer/Product, and there you have it...0 -
Thank you very much for your answers!!
Always good tips!!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