Page 1 of 1

Printed event - 'Method not found' exception

Posted: Mon May 17, 2021 10:39 am
by Irena
Hello,

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
    }
}
But before entering event handler some unhandled exception occurs. Therefore, this situation cannot be debugged.
Unhandled Exception.jpg
Unhandled Exception.jpg (26.3 KiB) Viewed 4635 times
Do you know what can cause the problem?
Thanks in advance for your support.

Re: Printed event - 'Method not found' exception

Posted: Wed May 19, 2021 11:38 am
by Lech Kulikowski
Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.

Re: Printed event - 'Method not found' exception

Posted: Thu May 20, 2021 9:23 am
by Irena
Link to the project: https://drive.google.com/file/d/1ukA6K1 ... sp=sharing

Thanks in advance.

Re: Printed event - 'Method not found' exception

Posted: Mon May 24, 2021 7:56 pm
by Lech Kulikowski
Hello,

You should use compiled report. Please check the last release build in which was added Compilation in the NET Core:
lReport.CompiledReport.Printed += CompiledReport_Printed;

Thank you.