Setdata and Getdata in RTC - ?

krithikakrithika Member Posts: 56
edited 2012-02-08 in NAV Three Tier
What is the use of Setdata and Getdata in RTC (code.getdata,etc) ,why it is used ? and how to use that functions.
Unable to get that concepts . :?

Thanks in Advance

Comments

  • deV.chdeV.ch Member Posts: 543
    If you want do show data from the dataset in header, or footer, you need to refer to a reportitem (textbox) you can't directly refer to the dataset field.
    SetData, GetData is used to simplify this, so you don't need to mess around with 20-30 hidden textboxes to display header/footer data. You just need at least one textbox, there you have your data separated by a delimiter (char 177) with setdata you bind that data to a global variable. Once this this data is bound to that variable, you nolonger relay on the textbox being available on the current page (for example if you have 3 tables for different sections of your report, like in sales invoice, you can't refer your headers data to a textbox directly because that textox will never be available on all pages, because you have 3 different tables and the textbox can only bi in one of them).
    Therefore you need to the setdata asign the data to this global variable so its available on all pages.

    GetData obviously gets that separated data back to display it.

    I hope this was understandable, because i found it hard to explain, actually.

    BTW: The same applies to SetPicture / GetPicture
  • krithikakrithika Member Posts: 56
    Thanks Mohana and dev.ch.
Sign In or Register to comment.