Sell-To Customers Sales

shaneshane Member Posts: 20
I’m looking for some advice on how to best create a report that is the same as the standard “[10062] Top __ Customer List” report but calculates the sales by Sell-To Customer (Navision 4.0 SP1 SQL ).

I was considering creating a FlowField in the Customer table that sums the “Amount” field of Orders in the “Sales Header” table and then using the Top __ Customer List report as a template to create a new report. After doing some testing however, I get a warning complaining that “The FlowField value cannot be calculated” when running the Customer Table after adding the new FlowField to the table.

Warning message:
You must define and activate a key that contains the key fields that appear below….
Key Fields: Document Type, Sell-to Customer No.
SumIndexField: Amount
Table: Sales Header

So am I on the right track with this or is there a better way to accomplish what I’m attempting?

Answers

  • ara3nara3n Member Posts: 9,257
    Hello Shane.
    The flowfield should be based on Cust. Ledger Entry. Not sales header. Look at "Sales (LCY)" field in Customer table. The change you will make to new field is that instead of using Customer No. = "No." to Sell-to customer no. = "No."


    Make a copy of the 10062 report and change


    CALCFIELDS("Sales (LCY)");

    to the new field

    CALCFIELDS("Sell-to Sales (LCY)");


    You also need to create a new key in cust. ledger entry

    Sell-to Customer No.,Posting Date,Currency Code with sumindex field Sales (LCY).
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • shaneshane Member Posts: 20
    Thanks very much for the reply.

    I feel silly for even asking now. I totally overlooked the Sell-To column in the “Cust. Ledger Entry.” table.

    Duh!

    Thanks again.
  • ara3nara3n Member Posts: 9,257
    Any time Shane
    Don't feel silly. There are 19333 fields in 4.0 SP2 database. There is always new fields that you never notice, until somebody asks for it. So feel free to ask, I'm sure other people will find this thread when they are looking for the same thing.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.