RE: SetData() and GetData() on NAV Reporting Layout
I've been tinkering with Reports for quite a while now aswell and i would not recomment using getData and SetData as for some of the reasons that have been already pointed out above aswell as the simple fact that the report Data breaks when using a certain character. Its most unlikely that anyone ever would use "±" in any sort of adress or name but if so all of the data in getData and SetData won't show in its proper position. This behavior is caused by the way microsoft decided to create these function which are btw also horrible in performance.
This is how SetData works:
Saves values in text arrays split by the ± character, the "group" parameter just helps microsoft organizing the arrays.
So basically your Adress Data would look like this: Name±Address±Address2±......
GetData splits those values again.
And you will probably understand my concern now. Try it out, use ± in a customers name or address.
The best way to avoid this is to either
- create your own getData and SetData functions or
- use the Reports VB codearea to save and set the data right from the dataItems in the report