Page 1 of 1

How do the Printed and Printing events from StiReport work?

Posted: Mon Mar 06, 2017 9:40 am
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.

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

Posted: Tue Mar 07, 2017 1:41 pm
by Alex K.
Hello,

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

Thank you.