How do the Printed and Printing events from StiReport work?

Stimulsoft Reports.UWP discussion
Locked
abgf
Posts: 6
Joined: Wed Nov 09, 2016 1:34 pm

How do the Printed and Printing events from StiReport work?

Post by abgf »

Hello, in my application, I send my report to print, but I would like to know if the report has been succesfully printed. I have tried to use the event Printed of the class StiReport, but it does not get triggered, I am not sure how it works. My code is something like this:

Code: Select all

StiPrintReport stiPrintReport;
StiReport report;

public async Task PrintReportAsync()
{
    report = await GetReportToPrintAsync(); //This methods get the report I want, prepared to be printed
    report.Printing += Report_Printing;
    report.Printed += Report_Printed;
    stiPrintReport = new StiPrintReport(report);
    stiPrintReport.RegisterForPrinting();
    await stiPrintReport.PrintAsync();
}

private void Report_Printing(object sender, EventArgs e)
{
     throw new NotImplementedException();
}

private void Report_Printed(object sender, EventArgs e)
{
     throw new NotImplementedException();
}
I put a breakpoint in Report_Printing and Report_Printed, but it seems when the report is sent to print, the events are not launched. How do they work? Is there any documentation about it? I could not find any example.
Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How do the Printed and Printing events from StiReport wo

Post by Alex K. »

Hello,

Unfortunately, it is not possible to get information about already printed pages.

Thank you.
Locked