Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

DataItemTableView Filter in Report Dataset

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

  • keoma Profile Picture
    keoma 32,675 on at
    RE: DataItemTableView Filter in Report Dataset

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

  • Lars Hædersdal Profile Picture
    Lars Hædersdal 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
    Saurabh Shah 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
    keoma 32,675 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans