Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

SETRANGE

(0) ShareShare
ReportReport
Posted on by 3,061

Hi

 In a report dropdown list appears with CheckBoxes. I want to Filter only those records in Code

  How to use SETRANGE for filtering only selected check box values on a request Page in a report.

Thanks

*This post is locked for comments

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 44,656 on at
    RE: SETRANGE

    Are you able to select two values ? What is the dropdown is it a custom temp table or real table data. If are already selecting those values on the request page then it will filter the table, why you want to apply the filter again ?

  • jsshivalik Profile Picture
    jsshivalik 3,061 on at
    RE: SETRANGE

    Hi

     Can u pls help me in more detail or graphically.

    Thanks

  • Verified answer
    ManishS Profile Picture
    ManishS 78 on at
    RE: SETRANGE

    Looks like your data item is Purch. Inv. Line, so why don't you show the field filter of that data item.

  • jsshivalik Profile Picture
    jsshivalik 3,061 on at
    RE: SETRANGE

    Hi

      I have tried this but it is giving error Type Conversion is not possible because one of the operators contains an Invalid Type Option := text

    "Purch. Inv. Line".SETRANGE(PCode,"Purch. Inv. Line".GETFILTER("Purch. Inv. Line".PCode)

    secondly if user has not selected any option then i want to display all

    Thanks

  • jsshivalik Profile Picture
    jsshivalik 3,061 on at
    RE: SETRANGE

    Hi

     https://imgur.com/a/KcHzf . It is a Table field.

    If 2 values are selected then accordingly it should SetRange.

    Thanks

  • Suggested answer
    Zaid Tariq Profile Picture
    Zaid Tariq 2,270 on at
    RE: SETRANGE

    Hi,

    Add the filter on OnPreDataItem trigger of the dataset i.e MyDataSet.SETRANGE(MyField,MyCheckBox1);

    If still need more elaboration reply with the screenshot of the dataset and request page highlighting the field(s) on which you want to apply filter.

    Thanks

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans