C/AL code not working in RTC

DekitoDekito Member Posts: 19
edited 2011-08-01 in NAV Three Tier
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

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    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 ISSERVICETIER
  • DekitoDekito Member Posts: 19
    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?
    Dekito
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Dekito wrote:
    Are you saying that even the code in one of Report designer's data item OnAfterGetRecord triggers won't fire in RTC?
    No..

    Put some messages in between your code and check where is the problem..
  • kinekine Member Posts: 12,562
    And are all your data you need displayed in some control in some section?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • DekitoDekito Member Posts: 19
    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.
    Dekito
Sign In or Register to comment.