How to cancel printing process
How to cancel printing process
Hi.
When clicked print button i checking some values and decide cancel printing or no.
i tried on printing event
ReportViewer.Report.IsStopped = true;
ReportViewer.Report.IsPrinting = false;
ReportViewer.Report.Stop = true;
but anyway reportviewer showing windows print dialog...
When clicked print button i checking some values and decide cancel printing or no.
i tried on printing event
ReportViewer.Report.IsStopped = true;
ReportViewer.Report.IsPrinting = false;
ReportViewer.Report.Stop = true;
but anyway reportviewer showing windows print dialog...
How to cancel printing process
Hello,
Unfortunately, if the task is sent for printing, then it is not possible to cancel this action.
Thank you.
Unfortunately, if the task is sent for printing, then it is not possible to cancel this action.
Thank you.
How to cancel printing process
Will you add new version this behavior?
How to cancel printing process
Hello,
Unfortunately, in this case it is impossible to add something, if control is passed to the print dialog box, the window is controlled with Windows, not a designer, and somehow to change this is not possible.
Alternatively, in this case, you can, in your application code, to check the condition and depending on the result, to hide or show the print button.
How to hide a button in the viewer you can view the article in our KnowledgeBase at
http://stimulsoft.helpserve.com/index.p ... icleid=105
Thank you.
Unfortunately, in this case it is impossible to add something, if control is passed to the print dialog box, the window is controlled with Windows, not a designer, and somehow to change this is not possible.
Alternatively, in this case, you can, in your application code, to check the condition and depending on the result, to hide or show the print button.
How to hide a button in the viewer you can view the article in our KnowledgeBase at
http://stimulsoft.helpserve.com/index.p ... icleid=105
Thank you.
How to cancel printing process
If "Printing" event triggered before than windows print dialog, component can take boolean value from user and decide show this dialog or no.
Whatever. Thanks for interest
Whatever. Thanks for interest

How to cancel printing process
Hello,
You can only, instead of cancel, skip or do not skip the Print dialog box, for this you need to subscribe to the PrintingDocument event of the viewer:
Thank you.
You can only, instead of cancel, skip or do not skip the Print dialog box, for this you need to subscribe to the PrintingDocument event of the viewer:
Code: Select all
StiReport report = new StiReport();
report.Load("e:\\Report.mrt");
StiViewerControl.PrintingDocument +=new EventHandler(StiViewerControl_PrintingDocument);
report.Show();
private static void StiViewerControl_PrintingDocument(object sender, EventArgs e)
{
StiReport report = sender as StiReport;
if (IsPrint)
{
report.Print();
}
}
Thank you.