I need to load data from within a report after collecting some report criteria in a report form. So far I have solved this the following way:
Program code:
Code: Select all
var reportService = new ReportService();
var report = new StiReport();
report.Load("report.mrt");
report.RegData("ReportService", reportService);
report.DesignWithWpf();
Code: Select all
IReportService reportService = this.Dictionary.DataSources["ReportService") as IReportService;
IList personList = reportService.FindPersons("Christian");
foreach(Person person in personList)
{
MessageBox.Show(person.Name);
}