Printed event - 'Method not found' exception

Stimulsoft Reports.WPF discussion
Post Reply
Irena
Posts: 9
Joined: Wed Feb 19, 2020 7:21 am

Printed event - 'Method not found' exception

Post 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 4412 times
Do you know what can cause the problem?
Thanks in advance for your support.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Printed event - 'Method not found' exception

Post by Lech Kulikowski »

Hello,

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

Thank you.
Irena
Posts: 9
Joined: Wed Feb 19, 2020 7:21 am

Re: Printed event - 'Method not found' exception

Post by Irena »

Link to the project: https://drive.google.com/file/d/1ukA6K1 ... sp=sharing

Thanks in advance.
Lech Kulikowski
Posts: 6197
Joined: Tue Mar 20, 2018 5:34 am

Re: Printed event - 'Method not found' exception

Post 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.
Post Reply