Passthrough functions and cancelling a report

Hi,

RB 21.01
Delphi 10.3.3

I have quite a few passthrough functions in RB that request interaction from a user when running a report.

My functions present a dialog asking for a choice and show an OK and a Cancel button.

If the user chooses Cancel how do I prevent a blank Preview page?

I've tried testing the return value of my function within the report and calling Report.Cancel but this doesn't prevent a blank Preview.

All reports are stored as template files and are loaded into a TppReport component therefore the functions are called from RAP so I need a way to cancel the Preview page from within the report itself not Delphi code.

Thanks in advance

Rhonda




Comments

  • Hi Rhonda,

    Report.OnInitializeParameters(var aCancel: Boolean);

    Set aCancel parameter to True to cancel the report.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • Fantastic - thank you
Sign In or Register to comment.