Hi,
I have a problem with C/AL coding from the Report Designer. I have prepared a Classic Client (CC) report and it works fine. Now I'm building also a RTC on top of it. As far as I know the whole C/AL coding applies in RTC, too, except that from the Sections Designer.
Here is the problem: in CC the coding from the Report Designer is GETting data properly from the actual tables in the database AND the auxiliary tables that are copycat from the actual (generated in the code), but are used in defferent sections.
In RTC this code (which is in the Report Designer) DOES NOT GET any data from the auxiliary tables. Since I can't use the data ONLY from the actual table (it'll give me same values for different sections) I'm preety much stuck.
I would appreciate any help, pls
(if needed I'll provide more info to make it more clear)
10x
Dekito
0
Answers
You need to shift the code to appropriate sections like OnAfterGetRecord trigger of dataitem..with ISSERVICETIER
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
But the code written is not a Sections Designer trigger, it is in one of Report Designer's data items (which as far as i know should fire in RTC as well), and yes you guessed right, it is in OnAfterGetRecord section.
Are you saying that even the code in one of Report designer's data item OnAfterGetRecord triggers won't fire in RTC?
Put some messages in between your code and check where is the problem..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Yes.
I have identified the problem: There are two groupheader Sections in SectionsDesigner which have some code in the OnPreSection() part.
They change a boolean variable, which trigers some part of the code in the Report Designer.
Now I don't know where exactly to put this code in the Report Designer (OnPreDataItem(), OnAfterGetRecord() etc.).
And should it alwas be placed in the dataItem whith the same name as the Section in SectionsDesigner?
Here is the code that causes me trouble:
abcd := CurrReport.TOTALSCAUSEDBY = FIELDNO("Source Doc. Type");
where 'abcd' is the boolean variable.