How to save preview to file?

Hello,
I can save report from preview window by clicking on Save button and save whole preview into file. But I don't know how this make programmatically. Access violation exception is raised when I call method frxReport1.Preview.PreviewPages.SaveToFile(SaveDialogExport.FileName);


Best regards
Tomas

Comments

  • edited 6:20AM

    Hi!
    Report.LoadFromFile ('yourreport.fr3');
    if (SaveDialog.Execute) then begin
       Report.PrepareReport;
       Report.PreviewPages.SaveToFile(SaveDialog.Filename);
    end;
    

    ;)
  • edited 6:20AM
    How about a c# example?
  • edited May 2011
    _snake wrote: »
    Hi!
    Report.LoadFromFile ('yourreport.fr3');
    if (SaveDialog.Execute) then begin
     ?  Report.PrepareReport;
     ?  Report.PreviewPages.SaveToFile(SaveDialog.Filename);
    end;
    

    >

    It's jast what I am looking for
    Thanks a lot for your help.


  • edited 6:20AM
    Thanks for this one.>
  • edited 6:20AM
    Hi tomas

    I believe _snake it is correct, hope that helped you, anything else give me a shout.
    Regards
    Adam

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.