Keep preview of the report after print / export

Hi,

Maybe this is a simple question but I didn't find it yet. I have my own preview window with frxPreview.
After displaying the report with PrepareReport / ShowPreparedReport , the user can actually print or export it or both.
But when I choose e.g. print, the preview window gets reset and is empty. I tried to do ShowPreparedReport again but apparently it's
really reset during the print/export. I don't want to redo the preparereport / showreport cycle ( performance )
I didn't find any property on either the report or preview to make this happen ( It seems that in the default preview window
this is working like that so it must be possible )

regards

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:33PM
    is your custom preview form modal
  • gpigpi
    edited 4:33PM
    Do you use frxPreview1.Print or frxReport1.PreviewPages.Print?
  • edited 4:33PM
    gordk wrote: »
    is your custom preview form modal
    No, it's embedded in a normal form
  • edited 4:33PM
    gpi wrote: »
    Do you use frxPreview1.Print or frxReport1.PreviewPages.Print?
    I tried both now without any difference
  • edited 4:33PM
    Hi all

    The 'trick' ( or design ) is to use the print / export functions on the preview component. Not on the report component.
    Another thing I noticed is that that if you assign a preview component, then the report.preparereport already shows the content in the preview and
    no extra report.showpreparedreport is required.
    Thanks for your responses

    regards

    PS Hope I never have to do a report migration again....Fast reports : please stay alive >.
  • gpigpi
    edited 4:33PM
    wrote:
    The 'trick' ( or design ) is to use the print / export functions on the preview component
    But you tell
    wrote:
    I tried both now without any difference
    What is right?
  • edited 4:33PM
    gpi wrote: »
    gpi wrote: »
    The 'trick' ( or design ) is to use the print / export functions on the preview component
    But you tell
    gpi wrote: »
    I tried both now without any difference
    What is right?
    You are right, sorry you for the confusion. I didn't see the difference in the answer . I thought you answered frxreport.print and frxreport.previewpages.print....
    So that doesn't make a difference.
    Using frxpreview.print is what is required

    Thanks.
  • edited 4:33PM
    dide2000 wrote: »
    dide2000 wrote: »
    dide2000 wrote: »
    The 'trick' ( or design ) is to use the print / export functions on the preview component
    But you tell
    dide2000 wrote: »
    I tried both now without any difference
    What is right?
    You are right, sorry you for the confusion. I didn't see the difference in the answer . I thought you answered frxreport.print and frxreport.previewpages.print....
    So that doesn't make a difference.
    Using frxpreview.print is what is required

    Thanks.

    Question: The report is lost from preview (TfrxPreview) after exporting the report frxReport1.Export(frxPDFExport1). What should be done ?
    Answer:

    Do this:
    frxPreview1.Lock;
    frxReport1.Export(frxPDFExport1);
    frxPreview1.UnLock;
    

    Or this :
    frxPreview1.Export(frxPDFExport1);
    

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.