Report SKIP OnAfterGetRecord() and Footer - OnPreSection

andy76andy76 Member Posts: 616
Hello,

I have a report where I have a condition that in the trigger OnAfterGetRecord()

...
IF XXX THEN
CurrReport.SKIP;
...

but I see that trigger: Footer (7) - OnPostSection() of same dataitem is executed. Is that correct or the debugger wrong?

Can I know in this trigger if the record is skipped or not?

Thank you

Comments

  • MBergerMBerger Member Posts: 413
    Printing of fhe footer is independent of the number of bosy lines printed, but you could do it by keeping track of how many body line were printed for that dataitem. Just add a global integer, set it to zero in the OnPreDataitem, and add 1 when a record doesn't get skipped. YOu can then show the footer depending on that counter.
  • DenSterDenSter Member Posts: 8,304
    The code might be executed, but the footer won't display if there are no records for that dataitem. This is one of the reasons why all code involving any data should be in dataitem triggers, not in section triggers.
Sign In or Register to comment.