Skip SalesInvoice Line

rfajdigarfajdiga Member Posts: 40
edited 2014-04-30 in NAV Three Tier
Hi guys,
I have one problem, and it relates to reports. So question is, how in R206 Sales Invoice skip lines where quantity is 1?
so for example I have:
Bicycle 5 pcs
Monitor 1 pcs
Laptop 3 pcs
and now I wanna to not show and count this line with 1 pcs so at the end I will have quantity and amount only for 8pcs from Bicycle and Laptop.

Comments

  • MarijnMarijn Member Posts: 69
    It has been a while since I last modified reports, but I would try putting this line in the Sales Invoice Line - OnAfterGetRecord

    IF Quantity = 1 THEN
    CurrReport.SKIP;
  • rfajdigarfajdiga Member Posts: 40
    Marijn wrote:
    It has been a while since I last modified reports, but I would try putting this line in the Sales Invoice Line - OnAfterGetRecord

    IF Quantity = 1 THEN
    CurrReport.SKIP;

    Thank you it works, but in mean time I found one solution that also get same result, but is it correct to write like this:

    IF "Sales Invoice Line".Quantity = 1 THEN
    "Sales Invoice Line".SETFILTER("Sales Invoice Line".Quantity,'1');

    in Sales Invoice Line - OnPreDataItem() record?
  • Wisa123Wisa123 Member Posts: 308
    IF "Sales Invoice Line".Quantity = 1 THEN
    "Sales Invoice Line".SETFILTER("Sales Invoice Line".Quantity,'1');
    

    I cant really think of a way how this should even work #-o

    Use Marijns aproach or set a table filter in the DataItem itself (which would be the cleanest solution)
    Austrian NAV/BC Dev
Sign In or Register to comment.