Problems with StiDesignerControl

Stimulsoft Reports.NET discussion
Post Reply
ales
Posts: 1
Joined: Tue Oct 13, 2009 7:40 am
Location: ČR

Problems with StiDesignerControl

Post by ales »

Hello,
I have main form (in c#), that contain StiDesignerControl. If I open report i.e. TestReport.mrt then main form title header shows
TestReport.mrt - Designer. Its Ok for version 2009.1.
In version 2009.2 - opening report does not change the main form title header. Please, how to correct ?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Problems with StiDesignerControl

Post by Edward »

Hi,

Although this way is not a very beautiful, but is still possible:

StiDesigner.CreatedReport += new EventHandler(StiDesigner_GetReportName);
StiDesigner.LoadedReport += new EventHandler(StiDesigner_GetReportName);
StiDesigner.SavedReport += new EventHandler(StiDesigner_GetReportName);

public void StiDesigner_GetReportName(object sender, EventArgs e)
{

this.Text = System.IO.Path.GetFileName((sender as StiDesignerControl).Report.ReportFile);
}

Thank you.
Post Reply