Dieses Beispiel ist veraltet, checken Sie viele anderen aktualisierten Beispiele in dieser Kategorie aus. This sample shows how to use the Save and Load events in the code. You can add the event listeners to the StiOptions.Engine.GlobalEvents at application initialization:
public Form1()
{
	InitializeComponent();
	
	StiOptions.Engine.GlobalEvents.SavingReportInDesigner +=
		new Stimulsoft.Report.Design.StiSavingObjectEventHandler(GlobalEvents_SavingReportInDesigner);
		
	StiOptions.Engine.GlobalEvents.LoadingReportInDesigner +=
		new Stimulsoft.Report.Design.StiLoadingObjectEventHandler(GlobalEvents_LoadingReportInDesigner);
}

Then specify the action to be performed when the report is loading:
...

private void GlobalEvents_LoadingReportInDesigner(object sender,
	Stimulsoft.Report.Design.StiLoadingObjectEventArgs e)
{
	e.Processed = true;
	
	StiReport report = new StiReport();
	report.Load("..\\..\\Reports\\SimpleList.mrt");
	designerControl1.Report = report;
}

...

Specify the action to be performed when the report is saving:
...

private void GlobalEvents_SavingReportInDesigner(object sender,
	Stimulsoft.Report.Design.StiSavingObjectEventArgs e)
{
	if (designerControl1.Report == null) return;
	e.Processed = true;
	
	designerControl1.Report.Save("Report.mrt");
}

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.