Preview Form - How to check "FPreview.FRunning"

Mark ElderMark Elder SD, USA
edited 2:51AM in FastReport 4.0
Hello,

I am building a report preview form for my application. I have the professional version so I have access to the source code. I started looking at the code in frxPreview for the PreviewForm as a starting point for building my own preview form.

There are number of places in the code where the PreviewForms checks the FRunning flag on the TfrxPreview object. For example in the CloseQuery event there is this:
CanClose := not FPreview.FRunning;

FRunning is private. The TfrxPreview and the PreviewForm classes are in the same Pas file so the PreviewForm can read the private variable. I can't do that in my own preview form.

I can't seem to find any way to access the "running" status from a public method. Is there something that I am missing?

Is this really needed? Are there things happening on a different thread or are there calls to Application.ProcessMessages that I need to be concerned about?

Thanks,

Mark

Comments

  • Mark ElderMark Elder SD, USA
    edited 2:51AM
    I just found the OnProgress, OnProgressStart, and OnProgressStop events that are on the actual report object (TfrxReport). It looks like I can use these to track the running status myself and as a bonus add a progress bar to my viewer.

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.