Using of PrintingDocument or ClickPrintButton event of a viewer

Stimulsoft Reports.NET discussion
Post Reply
JeffB
Posts: 17
Joined: Fri Dec 18, 2009 9:24 am
Location: Toulouse (France)

Using of PrintingDocument or ClickPrintButton event of a viewer

Post 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
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Using of PrintingDocument or ClickPrintButton event of a viewer

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