Report 206: Using code.getdata

Hello, Please i want to customize the report 206 in nav 2013.

i need instructions about re )port customization and the definition of ( code.getdata(1,1) ) and how to change the result of this function.

Thanks

Hi Lorisse,

What do you mean by “how to change the result of this function”?

If you mean add or change the fields displayed with code.getdata(x,y) then you need to change the definition of X and Y. [;)]

That is done in the report body. In the first line there is a small table-box where each of the “data blocks” are defined. When you select Expression you will see a list of the fields listed like this:

= Cstr(Fields!CustAddr1.Value) + Chr(177) + Cstr(Fields!CustAddr2.Value) + Chr(177) + Cstr(Fields!CustAddr3.Value) + Chr(177) +

Each line in here is a value you use with the code.getdata(x,y). In this example code.getdata(1,1) will display the first row = CustAddr1. If you need to insert a new field, you can insert it in the bottom of this expression in the same way. You new field will then be the next number - or just count the number of lines! NOT a very elegant way, but as I see it then it’s really just a work-around to get these Document reports to work with the RDLC report designer in Visual Studio.

here is a blog on how to use setdata and getdata.

have a look

http://www.dynamicsnavconsultant.com/2010/07/how-to-define-setdata-and-getdata-in-rtc-reports-in-dynamics-nav-navision/