Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

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

Posted on by Microsoft Employee

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

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

    Hi Jonathan,

    Valuable tip. Will try out :)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First(Value) Method vs Set/Get Method in 2015/2016 VS Report builder

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First(Value) Method vs Set/Get Method in 2015/2016 VS Report builder

    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.

  • Verified answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: First(Value) Method vs Set/Get Method in 2015/2016 VS Report builder

    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

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

    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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: First(Value) Method vs Set/Get Method in 2015/2016 VS Report builder

    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?

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: First(Value) Method vs Set/Get Method in 2015/2016 VS Report builder

    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.

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans