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

AutoSearch Dialog will not "Cancel" if error in RAP code

edited August 2014 in General
Clicking Cancel will not dismiss the modal dialog if the reporting
engine finds an error in any RAP code, with the effect that you can't do
anything except kill your app (and lose all the unsaved work you've done
on a report).

v15.04

Comments

  • edited August 2014
    Hi Paul,

    Which RAP event is the error occurring? In a simple test I created an
    AutoSearch report and purposely added some RAP code that accessed an
    invalid object to various events (BeforePrint, AfterPrint,
    BeforeAutoSearchDialogCreate, AfterAutoSearchDialogClose, etc.).

    In all cases, an error was shown that the RAP code could not be compiled
    and the report exited gracefully.

    Please provide the exact steps I need to take to recreate this issue or
    create a simple example that demonstrates the problem and send it to us
    in .zip format.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2014
    I'm using the AfterAutoSearchDialogClose event. The trick is to write
    RAP code that compiles but will error (e.g.
    Showmessage(DatetimeToStr('SOME invalid date string'));

    Completely reproducible with your end user Nexus demo and I just spent a
    while i) getting this demo to work because of errors in design time
    settings and ii) writing a report to prove it and, hey, I got it to
    error and get stuck in Cancel button loop but ~*$~&")~£$! I had to kill
    the app having forgotten to save the report! :)

  • edited August 2014
    Hi Paul,

    Thanks for the information. Using the End-User demo I was able to
    recreate the issue. This is something that has likely been happening
    since the beginning due to the fact that it is simply how modal forms
    behave in Delphi.

    We created a patch that solves the problem for RB 15.04. Send an email
    to support@digital-metaphors.com to receive the update.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.