web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

DataItemTableView Filter in Report Dataset

(0) ShareShare
ReportReport
Posted on by 750

Hi

I have a copy of the Sales - Invoice Report that I want to modify.
On the "Sales Invoice Line" I want to use a filter so that only certain lines are removed from the dataset.

As default it is "SORTING(Document No.,Line No.)"

In pseudocode I want a where claus that says 

Where ("No."<>"" and "Quantity">0) or ("No."="" and "Quantity"=0)

Is that possible?

*This post is locked for comments

I have the same question (0)
  • keoma Profile Picture
    32,729 on at
    RE: DataItemTableView Filter in Report Dataset

    i'm sure lars would have checked that for himself. ;-)

  • Lars Hædersdal Profile Picture
    750 on at
    RE: DataItemTableView Filter in Report Dataset

    Great I just modified the solution to

    if (("No."<>'') AND ("Sales Invoice Line".Quantity > 0)) or (("No."='') and ("Sales Invoice Line".Quantity = 0)) then begin

     //Process code

    END

    ELSE

     CurrReport.SKIP;

  • Verified answer
    Saurabh Shah Profile Picture
    4,560 on at
    RE: DataItemTableView Filter in Report Dataset

    Just slight difference, I guess

    if (("No."<>'' ) and (Quantity > 0)) or ( ("No."='' )and (Quantity = 0) )then

    CurrReport.Break;

  • Verified answer
    keoma Profile Picture
    32,729 on at
    RE: DataItemTableView Filter in Report Dataset

    add following at the beginning of trigger "Sales Invoice Line - OnAfterGetRecord()":

    if ("No."<>'' and Quantity > 0) or ("No."='' and Quantity = 0) then

     CurrReport.Break;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans