This sample project demonstrates how to edit report in the designer. First of all, create new
StiReport()
:
private void ButtonNew_Click(object sender, RoutedEventArgs e)
{
StiDesignerControl1.Report = new StiReport();
}
...
Then, use
StiDesignerControll.Report
to attach report to the designer:
...
private void ButtonEdit_Click(object sender, RoutedEventArgs e)
{
var report = new StiReport();
report.Load(@"Reports\SimpleList.mrt");
StiDesignerControl1.Report = report;
}
Also, you can use
DesignV2WithWpf()
to edit the report:
...
private void ButtonV2_Click(object sender, RoutedEventArgs e)
{
var report = new StiReport();
report.Load(@"Reports\SimpleList.mrt");
report.DesignV2WithWpf();
}
...
In the screenshot below you can see the result of the sample code: