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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

First(Value) Method vs Set/Get Method in 2015/2016 VS Report builder

(0) ShareShare
ReportReport
Posted on by

I've noticed that you can use the First(Value) in the header instead of the slow and tedious method to set and get data. Is there any disadvantages to using the First(Value) in your reports' header?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Well, if you print multiple documents at the same time then it always prints the value from the first document if you use First Method.

  • Community Member Profile Picture
    on at

    Would there be a way to avoid this. I've noticed that you can write something after selecting a value? It's a real time saver if it was possible to make it select the first value of the current page instead of the first value of all pages together?

  • Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at

    Hi ZipZip,

    I have written a blog article regarding this. Can you give me your thoughts on SetData() and GetData()?

    Link to my blog article:  https://goo.gl/VKyV1V

  • Verified answer
    keoma Profile Picture
    32,729 on at

    Using First(Fields!DocNo.Value) works, if you print one record.

    For printing a couple of records: add a textbox to the body section, set property hidden to true, set value/expr. to =Fields!DocNo.Value, set name=RepItemDocNo, add a textbox to the header, set expression to =ReportItems!RepItemDocNo.Value. save, retry.

    with that you do not need get/setdata. get/setdata can be used, but reduces the performance.

    additional follow https://community.dynamics.com/nav/f/34/p/188794/477130#477130

  • Community Member Profile Picture
    on at

    Thank you for the insight Nareshwar. SetData and GetData is also the last option in my case. It's very time consuming, and to be honest a poor choice of programming in my oppinion. Unfortunately it's also the only choice you have, if you wish to use, dynamic values. I've been able to cut down on the SetData and GetData by using first, on static values, like Captions, but I was hoping to avoid it.

  • Community Member Profile Picture
    on at

    Interesting. Thank you for this. Unfortunately I'm not able to sacrifice performance for practicality.

  • Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at

    Hi Jonathan,

    Valuable tip. Will try out :)

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans