Using CALCFIELDS for just some Customers

fmhiguefmhigue Member Posts: 290
edited 2004-08-24 in Navision Attain
Let me give you a brief explanation:

We got two companies on Navision: USA and Mexico.
We have one report call "Backorders by Customer" this report shows, Order Number, Customer No, Item, Qty, Oustanding Qty Qty Available and Qty on Purchase Orders. All these information is coming from Mexico Company. I am changing the report to show Qty on Sales Order on USA company. At this moment the report is bringing the right information but I want to filter only Qty on Sales Orders for 3 customer numbers (Those numbers are the ones USA use to billed us).

Here is the code

CompanyInformation.GET;
IF COMPANYNAME <> CompanyInformation.DSIUSCompanyName THEN
BEGIN
Item2.CHANGECOMPANY(CompanyInformation.DSIUSCompanyName);
Item2.GET(Item."No.");
Item2.CALCFIELDS(Item2."Qty. on Sales Order");
QtySO := Item2."Qty. on Sales Order";
END;


How can I use SETFILTER option to select some specific accounts?

Hope I made myself clear
Thank you in advance

Comments

  • AlbertvhAlbertvh Member Posts: 516
    What you could do is add "Customer No. Filter" field to the item table. Then add this field onto the Sales Qty field properties using
    Itemledger."Source no."=field Item."Customer No. Filter"

    Hope this is clear enough :wink:
  • fmhiguefmhigue Member Posts: 290
    It's pretty clear!
    Let me take a look today

    Thank you
    :)
Sign In or Register to comment.