Florian
Florian

Reputation: 1887

Navision Report Filter

Given a report with a data item Customer and a data item SalesLine.

I display all Saleslines from each Customer. How do I filter these Customers out which does not have Sales Line? Where do I need to put the filter?

Upvotes: 1

Views: 1393

Answers (1)

Rob Burke
Rob Burke

Reputation: 5515

In the OnAfterGetRecord trigger for each Customer, do a count of their SalesLines and if the count is zero then use CurrReport.Skip() to skip that data item (Customer).

Something like this:

IF SalesLines.COUNT = 0 THEN BEGIN
  CurrReport.SKIP()
END

Upvotes: 2

Related Questions