Page 1 of 1
Access to Closed event
Posted: Sun Dec 05, 2010 12:34 am
by nimam2008
pls. tell me how i can to access to Closed event Stimulsoft?
for more explanation:
i want to, my program(C#) do something when user closed the Report form.
Regards,
Access to Closed event
Posted: Mon Dec 06, 2010 1:11 am
by Alex K.
Hello,
You can use the following code:
Code: Select all
private void btnDesign_Click(object sender, EventArgs e)
{
StiReport report = new StiReport();
StiOptions.Engine.GlobalEvents.ClosingDesigner += new CancelEventHandler(GlobalEvents_ClosingDesigner);
report.Load();
report.Design();
}
void GlobalEvents_ClosingDesigner(object sender, CancelEventArgs e)
{
// your code
}
Thank you.
Access to Closed event
Posted: Sun Dec 12, 2010 12:28 am
by nimam2008
Very Thanks for your solution, but I need to Closed event of Report .
Access to Closed event
Posted: Mon Dec 13, 2010 4:14 am
by Ivan
Hello,
Sorry, maybe we did not exactly understood your question. Could you explain your issue in more details.
Thank you.
Access to Closed event
Posted: Tue Dec 14, 2010 9:45 am
by nimam2008
of course;
i use from belwo code for show my report
Code: Select all
stiReportRA.Load("..\\..\\stiReportRA.mrt");
.
.
.
stiReportRA.Show();
and when user closed the Report then my program do something.
actually, i want one code like Aleksey's Code but with Closed Event for Report that displayed and not for report Designer.
Access to Closed event
Posted: Wed Dec 15, 2010 4:13 am
by Alex K.
Hello,
In this case, you can use the StiViewerControl
Code: Select all
StiReport report = new StiReport();
report.Load();
...
stiViewerControl1.Report = report;
stiViewerControl1.Close += new EventHandler(stiViewerControl1_Close);
...
void stiViewerControl1_Close(object sender, EventArgs e)
{
\\ your code
}
Thank you.