Sunday, May 7, 2017

How to use Getdata and Setdata in RDLC Reports of NAV 2017?

Hi All,

Today I am going to post how to use GET DATA and SET DATA function in MS Dynamics NAV 2017 RDLC Reporting.

Why we need GETDATA and SETDATA?

We need this functionality in RDLC Reporting so that we will be able to modify the header part with Body part in MS Dynamics NAV.

How RDLC Reports Works?

In RDLC we have 3 Sections on which we have to work with our defied datasets.

Header :- Runs only ones at the start of the reporting.

Body :- Stores all the data and run multiple times untill dataset has records to show.

Footer :- Runs only ones at the last page on reporting.

Examples of Getdata Setdat Reports in MS Dynamics Nav :-

Report 206 and many more.


Steps to follow how to use Getdata and Setdata :-

1. To implement Getdata Setdata in any report you need to copy all code from Report 206 present in RDLC report properties. For Reference have a look.


2. Now you need to find out a textbox which has properties of invisible and copy all code present on its visiblity condition and copy paste it in excel as its my preference to understand better ahead.

3. Now in Excel File we have number of rows and this row number is used in textboxes of Header you can have a look in expression of textboxes present in Header of Report section.

4. To add a Field in existing report you need to add a expression in the last line of this excel and it will be same as the expressions already present and get the number where it is coming. Then you need to insert the textbox and write in expression of Textbox.
Code.GETDATA(No. on Excel Line , 1)



I think it will be enough to explain in theory i will post a video for this topic if my readers want the video to explain.  I hope it will be better for all my NAV developers to design reports in more specific way.


Please comment and subscribe for more posts like this.

No comments:

Post a Comment