How to detect when there is nothing showing in a preview

edited 10:55AM in FastReport 4.0
Hi

I have created a custom preview form (using the std preview component) and I want to be able to detect if there is a report displayed in the preview or not. I can't spot an obvious property (other than visible which is about the preview visiblitity rather than the report).

Any thoughts?

Cheers
Shane

Comments

  • gpigpi
    edited 10:55AM
    Try to check TfrxReport.PreviewPages.Page[0].AllObjects.Count
  • edited 10:55AM
    Hi and thanks for responding.

    I gave that a crack, and it AVd on me - However that was probably because the PreviewPages.Count was 0, which seems to be a good enough indicator of when there is no report, so thanks for the pointer.

    Incidentally, at the same time the PreviewPages.Count = 0, the Report.PagesCount = 2 which seems odd to me. Am I missing something fundemental in how Frx works here - i.e. is PreviewPages actually where the report is drawn rather than in the report component?

    Cheers
    Shane
    gpi wrote: »
    Try to check TfrxReport.PreviewPages.Page[0].AllObjects.Count

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.