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();
}
...
На скриншоте ниже Вы можете увидеть результат выполнения данного кода: