Exporting from custom preview form

When I export my report from a custom preview the export works fine, but at the end the preview of the report disappeared.

This code I call from the preview window (an action)
===
oExportfilter := TfrxCustomExportFilter(frxPDFExport1);
oExportFilter.ShowDialog := TRUE;

frxReport.Export(oExportFilter);

or this (another try)

frxPDFExport1.ShowDialog := TRUE;
frxReport.Export(frxPDFExport1);
==

After the export the preview window of the report will be empty.
What did I do wrong so the report disappeared.

regards,
Gebko Hahn

Comments

  • edited 7:41PM
    Hello,

    I've found a solution for it.
    At first I've had a central reportmodule with a separate previewform. I've moved all the export stuff from the central module to the previewform and now I export from the preview form.

    So:
    frxPreview.Export(....)

    regards,
    Gebko
  • marc59marc59 LILLE (FRANCE)
    edited 7:41PM
    Hi,

    I have the same problem with export and... print methods !

    After print or export, custom preview is empty.

    It's a very embarrassing problem...

  • marc59marc59 LILLE (FRANCE)
    edited 7:41PM
    I use theses methods to prepare and preview my report :

    frxrEtat.PrepareReport;
    frxrEtat.ShowPreparedReport;
    ...
    frxrEtat.Print


    To workaround this bug, I've had a new prepareReport and ShowPreparedReport after printing or exporting, but it's not very cool. User must wait because report is rebuilt !
  • edited 7:41PM
    Printing from a preview windows works well. I've been looking further in my code and I remarked that now I used the methods "print" and "export" directly from the TfrxPreview component instead of using them from the TfrxReport component.

    So the former use of the method was the reason that after a print the report was still in the preview window and after an export it dissapears.

    When I use these methods from the TfrxReport component I don't use the preview form and then everything is ok.

    But strange is that when you print from the preview window there is no flickering of the window and when you use the export method than there is one (a refresh?).

    But it now it works the same as with FR2.54, so the user should not see it.
  • marc59marc59 LILLE (FRANCE)
    edited February 2005
    ;) OK, i've replaced report methods by preview method and it's run perfectly.

    I can see a flicker due to a refresh too in FR 3.09

    Thanks !

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.