Closing preview window after print

Hi,
Is it possible to close Preview screen after the printing completed?

Thanks in advance.

Comments

  • edited 7:00PM
    Hello,

    You have to use own preview window (see Demos\C#\CustomPreview sample).
  • edited 7:00PM
    Thanks Alex,
    But I want to know printing completed or not, I think it is too expensive solution that designing custom preview form.

    Adding event or property to the report object to know printing status will be very useful.
    Do you think is it possible? [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Thanks.[/img]
  • edited 7:00PM
    This is a specific request (closing the preview after print), so I don't think it will be useful for others.
  • edited 7:00PM
    Hmm OK Alex but,
    There is IsPrinting propery in report object maybe adding IsPrinted propery will be very useful.
    For example, If report is printed i can log when and who printed report via using IsPrinted property.

    My company buy FastReport with sources, I try to add the property but it requires DevComponents.


  • edited 7:00PM
    You can attach own handlers to the progress events, to write to a log:
    Config.ReportSettings.StartProgress += new EventHandler(ReportSettings_StartProgress);
    Config.ReportSettings.Progress += new ProgressEventHandler(ReportSettings_Progress);
    Config.ReportSettings.FinishProgress += new EventHandler(ReportSettings_FinishProgress);
    
    private void ReportSettings_StartProgress(object sender, EventArgs e)
    {
    //
    }
    
    private void ReportSettings_Progress(object sender, ProgressEventArgs e)
    {
    //
    }
    
    private void ReportSettings_FinishProgress(object sender, EventArgs e)
    {
    // the operation is finished, you may analyze the Report.Operation property and write to a log
    }
    
    wrote:
    My company buy FastReport with sources, I try to add the property but it requires DevComponents.
    To compile FastReport.dll from source code, you don't need DevComponents. See Programmer's Manual, "General information/Compiling the source code".
  • edited 7:00PM
    Thank you very much Alex,
    It is OK >

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.