Dynamics 2013 Report Best Practice - GetData/SetData Confirm

LenishaniLenishani Member Posts: 7
edited 2014-02-27 in NAV Three Tier
Hello,

I need to create a Document Report similar to a sales Invoice report (e.g Report 206) whereby in the report header I will need to display Customer name/address etc. and the header needs to be dynamic in case the report is being generated for several invoices.

I would like to know if it is still advised to use the GetData/Set data function same as done in Report 206 or I can treat the header inside the report body.

Can someone please advise which is a best practice or standard recommended solution between these 2.

Thank you in advance.



Cheers.

Comments

  • clauslclausl Member Posts: 455
    This could be a very long answer, but I will not go there, so simple answer is: It depends on the requirements.

    If you can capture everything in one single List control in the Report Layout, you can do it all in the Body, except Page Number.

    If you at a later stage realizes that you need have a header it is actual easy to do when you have everything lined up in the Body. It took me around 10 min the other day to add a Page header and introduce Code.GetData and Code.Set Data to this document report. I moved around 40 fields from the body to the header.

    /Claus Lundstrøm
    Claus Lundstrøm | MVP | Senior Product Manager | Continia.com
    I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
    I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
  • jordi79jordi79 Member Posts: 273
    I read somewhere (i forgot where unfortunately...) that the GetData and SetData are legacy functions to support NAV 2009, and that in NAV 2013 R2, this is no longer required. And I did try this, I did managed to successfully modify report 206 to run without SetData and GetData. I just modify all the text boxes in the report header to refer to Fields!XXXX.Value and this worked. So is this true, that the SetData and GetData is no longer required?

    Because I find it cumbersome to find out what is Code.GetData(22,1). I have to go to the SetData function, and copy and paste into a text editor, and separate out each line of code to find out that is Code.GetData(22,1).
  • jordi79jordi79 Member Posts: 273
    After trying out for a while, you do not have a choice. If you are printing a report with multiple headers from body record (e.g. any documents in NAV, such as Orders, Sales Invoice, Purchase Order etc) then you would need to use SetData and GetData. If you are creating listing reports such as Aging, Balances, and any analysis reports, then you do not need to use SetData and GetData.

    I tried a report yesterday, and I really hated it. In my opinion, SetData and GetData is the single thing that made the RDLC report really inconvenient for NAV 2013.
Sign In or Register to comment.