Reading the cancel button on reports

MauddibMauddib Member Posts: 269
edited 2006-03-21 in Navision Attain
When running a form you can get back whether the user hits any of your buttons (ok, yes, no, cancel and so on).

Can this be done with reports somehow? If the user runs the report, gets to the "print", "Preview" and "Cancel" buttons. How can you get back to your menu button (which called the report) whether the user hit cancel or not?

GaMBe

Answers

  • jreynoldsjreynolds Member Posts: 175
    The OnPreReport trigger is run only if the user presses the PRINT/PREVIEW button but not if the user presses the CANCEL button. Therefore, if you define a global Boolean variable and set it to TRUE in the OnPreReport trigger this will record whether or not the CANCEL button was pressed. A function defined on the report will return this value to the calling environment.
Sign In or Register to comment.