Printed event - 'Method not found' exception
Posted: Mon May 17, 2021 10:39 am
Hello,
I want to close Print Preview window after sending report to the printer. My report is subscribed to Printed event.
But before entering event handler some unhandled exception occurs. Therefore, this situation cannot be debugged.
Do you know what can cause the problem?
Thanks in advance for your support.
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.