Page 1 of 1

Using of PrintingDocument or ClickPrintButton event of a viewer

Posted: Fri Dec 18, 2009 9:41 am
by JeffB
Hello,

I have a viewer control in a form and I want use an event from the viewer print button click to do some treatments without cancel printing.

I have tried to use some printing events like Stimulsoft.Report.Viewer.StiViewerControl.PrintingDocument and ClickPrintButton,
but they have done my treatments without doing any print job.
I want also doing the same treatment when there is a click on the save (export to a file format) button, is this possible?

Have you any solution?

Thanks for your time.

Jean-François

Using of PrintingDocument or ClickPrintButton event of a viewer

Posted: Sat Dec 19, 2009 7:15 am
by Jan
Hello Jean-François,

Please check following code:

StiOptions.Engine.GlobalEvents.PrintingDocumentInViewer += delegate(object sender, EventArgs e)
{
StiReport report = sender as StiReport;
report.Print(true);
};

Thank you.