I have an exercise where in I have to view all the customers placed an sales order.
I have used two tables, Customer and Sales Header(Intended).
I have set the DataItemLink ("Sell-to Customer No." of Sales Header and "No." of Customer Table).
But I m getting the list of all the customer. I want to see only the Customers who were placed the sales orders.
what I have to do?
0
Comments
>install Navision::4.0 SP1
>q
$
oOo
I tried it, even then I am not getting the exact result.
N.Sridhar
Get rid og the second dataitem and declare a record VAR of subtype SAles Header(SHeader), and onaftergetrecord of the first item, setfilter(No.,Sell-to-Cust). Now check, if Sheader.COUNT = 0, then currreport.skip.
That must give you Customers that hav placed orders.
I hope l am getting your requirement clearly.
>install Navision::4.0 SP1
>q
$
oOo
you can do it with setting PrintOnlyIfDetail to true, but you have to set it in the first dataitem. This should do the work.
Regards,
Frank
your method is going through all customers and seeing if there is a sales invoice header.
Have 1 DataItem (Customer)
Create a Variable SHeader (Sales Header)
OnAfterGetRecord of Customer DataItem add the following:
SHeader.Reset;
SHeader.Setrange("Sell-To-Customer No.",Customer."No.");
if not SHeader.find('-') Then CurrReport.Skip