Hi,
i m using the following code
report.Show(False)
my need is when user close the preview control(Window) i need a event which tells us the user clicks on close buttion.
Thanks,
Waiting ur reply
Getting the event when user close the preveiw report
Getting the event when user close the preveiw report
You can hook into the standard .net Form Closing Event (Closing or FormClosing depending on which version of .net you use)
Code: Select all
report.Render();
Stimulsoft.Report.Render.StiPreviewForm previewForm = new Stimulsoft.Report.Render.StiPreviewForm(report);
previewForm.Closing += new CancelEventHandler(previewForm_Closing);
previewForm.Show();
private void previewForm_Closing(object sender, CancelEventArgs e)
{
if(MessageBox.Show("Close Preview?", "Preview Report", MessageBoxButtons.YesNo) == DialogResult.No)
e.Cancel = true;
}