Cancel a report from a form

redStriperedStripe Member Posts: 83
Hi,
I have a report that calls a form in a loop.
The form is for writing the content of report lines.
That works fine.... But now I want a cancel button on that form,
that should cancel the form and the report.
If I set variable that I check for cancel the loop the report ignores it
and runs the loop til the end.
How can I cancel the loop or how can I close the report after
setting the variable with the cancel button?

Does anyone have an idea?

Regards,
Red

Comments

  • warraxwarrax Member Posts: 25
    Hi

    This should work:
    If ReportName.Run = action::cancel then
      CurrReport.Quit;
    

    Regards
  • kinekine Member Posts: 12,562
    Isn't it easier to call the report from the form and not the form from the report?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.