RSS

Dynamics NAV Reports (RDLC): SetData, GetData And Line Numbers

11 Oct

In Dynamics NAV reports we use SetData and GetData functions to retrieve data certain data in page headers and footers due to different scopes. In this blog post I’m not going to explain why and how but I’m going to give links to some good posts that does it at the bottom this post. Instead I’m going to give you a tip on how to make the process of adding/finding which data that has a certain index in the SetData function call by using line numbers.

In this example I’m using the report 206 “Sales Invoice” from Dynamics NAV 2015. Here you can see a typical GetData function call. Usually when you see this you wonder what the heck GetData(25,1) is and you start to curse Microsoft that they didn’t use place holder labels to make it easier for us (more about that later..).

GetData

So what are our options to find out which value 25 is? Well, one is to preview the report and hope that the example invoice contains a value in that field. The other options is to find the SetData function and start counting the rows until you hit index 29. This is how option two would look like. First we find the SetData function in report 206 (Dynamics NAV 2015) by using Document Outline in Visual Studio (Document Outline doesn’t exist in Report Builder). The SetData function call is located in the visibility expression.
SetDataSetData

As you can see you have to calculate each row until you have reached number 29. BUT! If you are using Visual Studio you can add line numbers to this view which will make it much easier. Unfortunately this is another function that doesn’t exist in Report Builder.
SetData With Line Numbers

So how to get these line numbers then? Well, start by opening the Visual Studio options window (Tools/Options).
Visual Studio Tools Options

Then choose Text Editor/All Languages/General and then tick “Line Numbers” and now you have line numbers in your expression window. This tip originates from one of Claus Lundstrøm report classes.
Visual Studio Options

Want to know more about GetData and SetData in Dynamics NAV reports? Here below are some good links that explains the concept behind it but beware, the placement of the SetData function call could be different depending of which version of Dynamics NAV you are running.

How Do I: Use SetData and GetData in Microsoft Dynamics NAV 2013 R2 [Movie]

Saurav Dhyani – RTC Report Development 3 (Dynamics NAV 2009)

Advertisements
 
1 Comment

Posted by on 2015-10-11 in Okategoriserade

 

Tags: , , , , ,

One response to “Dynamics NAV Reports (RDLC): SetData, GetData And Line Numbers

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Mark Brummel Blog | Microsoft Dynamics NAV

Master Classes Design Patterns and more...

Vjeko.com

ideas in the cloud

Goprowe AB

Reflections from the ERP field

ArcherPoint Developer Blog

Reflections from the ERP field

The NAV Viking´s Blog

- Sharing my experience in the Dynamics NAV world

Comments for waldo's blog

Reflections from the ERP field

Nav Can Be Fun

Its Really Fun to Work with Microsoft Dynamics Nav

Navision-Girl.Com

Reflections from the ERP field

LET'S TALK NAV

Tips, Tricks, How-To's & News about Microsoft Dynamics NAV & Dynamics 365 for Financials

Kine's Info

Reflections from the ERP field

blog.wibeck.org/

Just another WordPress.com site

NAV/SQL Performance - My Two Cents

Reflections from the ERP field

Hougaard.com – Applied Hacking

Reflections from the ERP field

Kauffmann @ Dynamics NAV

Reflections from the ERP field

Kriki’s Dynamics NAV blog

Reflections from the ERP field

Rashed Amini

Reflections from the ERP field

Olof Simren - Microsoft Dynamics NAV Blog

My blog about Microsoft Dynamic NAV tips and tricks. Remember to Subscribe!

Van Vugt's dynamiXs

Reflections from the ERP field

Navisionary – Dynamics NAV

Reflections from the ERP field

%d bloggers like this: