Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Exception Handleing question.

edited January 2002 in General
Jim,

Report.Print is being called and the exception is blowing within this call.
However, the ShowMessage in the except block is not being called.

Example:

try
report.print << report blows an exception.
except
ShowMessage("Error"); << not being called.
end;

Andy


-----------------------

If the Report.BeforePrint is not being called, then be sure to reassign the
event handler after a report template is loaded.


Cheers,

Jim Bennett
Digital Metaphors


Comments

  • edited January 2002
    When the template is loaded from file, then if it can't find this event
    handler in the form, then you'll get this exception. Open up the template
    in the report designer, and then nil out the BeforePrint event handler. Then
    save the template back down to file. Now, you won't get the error when the
    template is loaded, but you'll need to manually reassign the event handler
    to the one that exists on the form, which has your report object that the
    template is loading into.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.