OnAfterGetRecord in RTC report does not trigger

NagiNagi Member Posts: 151
edited 2011-08-30 in NAV Three Tier
Hello experts!

I'm struggling with a report in NAV 2009 R2. I have a report with both RTC and classic layout. In the classic client the report works fine, but when I run the RTC version the dataset is empty. I have discovered that the OnAfterGetRecord trigger does not fire when I run the RTC version, but I can't figure out why it doesn't. Are there any properties in the Visual Studio designer that controls this?

I would appreciate any input on this, because I'm pretty clueless about what to do. ](*,)

Answers

  • BeliasBelias Member Posts: 2,998
    no, the onaftergetrecord should fire correctly. Are you sure that you don't have some code under the sections?
    are you sure that some code is not conditioned by
    IF ISSERVICETIERE THEN BEGIN
      ...
    END;
    
    ?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • NagiNagi Member Posts: 151
    Thank you for you reply, Belias.

    In answer to your question, there is no code in the report that is conditioned by RTC vs. Classic. I added messages to the different triggers to see if they were fired, and in RTC the OnAfterGetRecord trigger simply doesn't fire.

    I'm still learning the basics of report design in RTC, but my understanding of it so far is that RTC will run through the entire report before outputing to the screen (where the classic client will output continously while running through the dataitems). That is why I'm quite baffled that the report does not fire the trigger. I thought maybe it could have something to do with sorting and grouping properties in Visual Studio, but I've had no luck with this. :-k
  • BeliasBelias Member Posts: 2,998
    are you sure you're running the correct report on the correct database? for my experience, the onaftergetrecord trigger fires correctly both on classic and RTC...
    are you 100% sure that the report works correctly in classic?does it show something?
    do you have a printonlyifdetail = true on the most indented dataitem, maybe?
    sorry, i'm just guessing...can you please post a screenshot of your dataitems, rdlc layout, classic layout and dataset (with the about this report feature).
    Moreover, a code snippet of the onaftergetrecord code should be useful
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • NagiNagi Member Posts: 151
    Turns out it's a filter issue. :oops:

    The report is run from two different points in the solution. The report call in the classic client handled the filters correctly (cancelling the filters from report call 1 when calling from report call 2 and vice versa), but the RTC kept the filters from report call 1 and then also applied the filters from report call 2, and that's why the OnAfterGetRecord was never fired.

    I've been staring at the screen for ages without seeing that. #-o

    But thank you for lending a helping hand, Belias! =D>
Sign In or Register to comment.