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 7:12PM
    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 7:12PM
    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 7:12PM
    Try to close form in TfrxReport.OnEndDoc event
  • edited 7:12PM
    But OnEndDoc event is executed after prepare all pages !
    I want to break process preparing pages !

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 7:12PM
    I normally display my own progress window, with a Stop button on it:

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

  • edited 7:12PM

    fReport.Terminated := true

    makes "Privileged instruction" error

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.