Cencelling preview

Hi,

I've created a custom preview form using TfrxPreview component.
For some very large reports, if I close preview form before the end of loading process, I receive a List out of bounds error message. I think I need to cancel processing.

I've tried:

frxPreview.Cancel
frxReport.Engine.StopReport

but the problem persists.

Any suggestion?
Thanks,


Rafael

Comments

  • edited 4:15AM
    But I, when I use Report.Engine.StopReport method
    I get EPrivilege class error (Privileged instruction)

    I want to stop preparing report and show prepared pages (if they are)
  • edited 4:15AM
    I have the same problem. StopReport doesn't help and there is a bunch error windows for user while he refreshes the report. In my situation problem exists even for small 20 page report built from three fr3 files.
  • gpigpi
    edited 4:15AM
    Try to close form in TfrxReport.OnEndDoc event
  • edited 4:15AM
    But OnEndDoc event is executed after prepare all pages !
    I want to break process preparing pages !

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 4:15AM
    I normally display my own progress window, with a Stop button on it:

    procedure TFormRptProgress.btnStopClick(Sender: TObject);
    begin
    fReport.Terminated := true;
    end;

  • edited 4:15AM

    fReport.Terminated := true

    makes "Privileged instruction" error

Leave a Comment