This is my first post in this forum, so please be patient
My code consists of a report, that modally runs a form (in OnAfterGetRecord for one of data items).
The problem is that while this modal form is not closed nothing stops user from closing the report. When the report is closed, modal form is left alone, and after closing it, Navision crashes (Navision version 4sp2).
I tried setting form as global variable and doing clear for it, in trigger OnPostReport, that did not work. Then I created a procedure in form, that closes it, and put the code that calls it again in trigger OnPostReport. That did not work either, because it seems that OnPostReport is not run, if report is closed in the middle of processing.
I guess a solution would be something like the subject of this topic, but I am afraid it is not possible.
Does anyone have other ideas?
In case someone asks what is the use of running a form in the report, here is my answer - when Request form is run, we yet do not know what filters will be put on the report, we know them only when report is actually run. My form needs to know these filters that's why I can't use request form so I don't see other way.