I want to close Print Preview window after sending report to the printer. My report is subscribed to Printed event.
Code: Select all
private void Report_Printed(object sender, EventArgs e)
{
var dialogResult = (sender as StiReport).PrinterSettings.PrintDialogResult;
if (dialogResult == Stimulsoft.System.Windows.Forms.DialogResult.OK)
{
//close print preview window
}
}
Do you know what can cause the problem?
Thanks in advance for your support.