Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

NAV 2013 R2. Report child dataset filter is ignored?

Posted on by 2,983

I have this report design where parent DataSet is "Customer" then child is "Vat Entry" and SubChild is "Item"

In the Request Page I'm putting a Item Categorý Code filter in the Item Table, but it's getting ignored. I'm getting VAT Entries from Items of other categories in my report.

ReportChildFilterIgnored.png

Is this expected behaviour??

*This post is locked for comments

  • Suggested answer
    Alexander Ermakov Profile Picture
    Alexander Ermakov 28,094 on at
    RE: NAV 2013 R2. Report child dataset filter is ignored?

    Is that because there is no relation between VAT Entry and Item?

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: NAV 2013 R2. Report child dataset filter is ignored?

    Even setting this property to Yes will make the OnAfterGetRecord of "Value entry" to trigger and affect other sections or datasets, like the Integer DataSet in My Example. In the case of my report, we add data to some buffers to show totals at the end of the document. We are trying to avoid this buffers to have data of items that must be filtered.

    Finally I solved it using FILTERGROUPS:

    In my Value Entry OnAftergetRecord I put this code:

    ItemFiltersTxt := ItemTable.GETVIEW; //this is a local Text variable
    rItemFilter.FILTERGROUP(10); //rItemFilter is a local record variable
    ritemFilter.SETVIEW(ItemFiltersTxt);
    rItemFilter.FILTERGROUP(0);
    ritemFilter.SETFILTER("No.","Item No.");
    
    IF NOT rItemFilter.ISEMPTY THEN BEGIN
    
    //INSERT DATA IN BUFFERS THAT AFFECT OTHER SECTIONS AND DATASETS  
  • Rashed Profile Picture
    Rashed 3,765 on at
    RE: NAV 2013 R2. Report child dataset filter is ignored?

    There is a property on the parent (Value entry) and customer called print only if detail.  Set that to yes.

    This way if there is no child (item) it will not print the customer and the value entry.

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: NAV 2013 R2. Report child dataset filter is ignored?

    Sorry that was a typo.. already edited the post

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: NAV 2013 R2. Report child dataset filter is ignored?

    Is there VAT-information in the table "Value Entry"?

    For NAV2017, I couldn't find anything related to VAT in this table.

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: NAV 2013 R2. Report child dataset filter is ignored?

    Wow.. so this is like an "Outer Join" behaviour.. it's the first time I realize this. So how could I enable an Item Table filter? The idea is that the user is able to get VAT entries using Customer filters and Item Filters (Customer ID, Customer Groups, Item ID, Item Groups, etc..)

    If I put the Item Table above the Value Entry DataSet, I loose the customer filter. Any way to mantain both table filters (customer and item)

    I just found this dataset property:

    PrintOnlyIfDetail  (but it's not working)

  • Hannes Holst Profile Picture
    Hannes Holst 5,767 on at
    RE: NAV 2013 R2. Report child dataset filter is ignored?

    Yes. With the above mentioned filter, you control the output of the "Item"-DataItem only.

    Because it's a Child-DataItem, it does not affect the output of the Parent-DataItem.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans