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
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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