C/AL code not working in RTC

Dekito
Member Posts: 19
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
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
-
Code written in the section trigger will not execute from RTC..
You need to shift the code to appropriate sections like OnAfterGetRecord trigger of dataitem..with ISSERVICETIER0 -
10x mohana_cse06 for the quick reply
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?Dekito0 -
Dekito wrote: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..0 -
And are all your data you need displayed in some control in some section?0
-
kine wrote:And are all your data you need displayed in some control in some section?
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.Dekito0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions