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
Using of PrintingDocument or ClickPrintButton event of a viewer
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.
Please check following code:
StiOptions.Engine.GlobalEvents.PrintingDocumentInViewer += delegate(object sender, EventArgs e)
{
StiReport report = sender as StiReport;
report.Print(true);
};
Thank you.