Options

How can i count customer no. per day

boku25boku25 Member Posts: 39
I need to create a report that counts a particular customer no. per day.
I tried using the
IF "Sell To Customer No." = '10319' THEN
SETFILTER("sales line"."Sell To Customer No.", '10319')myCount := "sales line".Count;

But its counts all customer no. I just need to count '10319'..
I need help..

Newbee

Comments

  • Options
    kinekine Member Posts: 12,562
    sorry, but it is not clear what are you doing... you wrote "counts a particular customer no. per day" - you mean how many customer cards you have in each day? ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    bostjanlbostjanl Member Posts: 107
    boku25 wrote:
    I need to create a report that counts a particular customer no. per day.
    I tried using the
    IF "Sell To Customer No." = '10319' THEN
    SETFILTER("sales line"."Sell To Customer No.", '10319')myCount := "sales line".Count;

    But its counts all customer no. I just need to count '10319'..
    I need help..

    Newbee

    Hi!

    I guess (from code) that you want to count sales lines for particular customer. :?
    I don't known where is this code. And whitout this is hard to guess. :?

    But there is one thing. You use SETFILTER on Rec not on "Sales line". So if "Sales line" isn't the current dataitem, then you filter difrent variable from that you COUNT from.

    Try:

    IF "Sell To Customer No." = '10319' THEN BEGIN
    "Sales line".SETFILTER("Sell To Customer No.", '10319')
    myCount := "sales line".COUNT;
    END;


    And as kine wrote, it is not clear what you are doing.


    regads

    Bostjan
Sign In or Register to comment.