This example shows the two basic ways to display a report in a WPF application: in an embedded WPF viewer control, or in a separate viewer window.

Embedding the viewer control. Place a StiWpfViewerControl in your XAML, then load and render a report and assign it:
var report = new StiReport();
report.Load(@"Reports\SimpleList.mrt");
report.Render();
StiWpfViewerControl1.Report = report;

Opening the report in a window. If you do not need an embedded control, call ShowWithWpf() and the report opens in a ready-made WPF preview window:
var report = new StiReport();
report.Load(@"Reports\SimpleList.mrt");
report.ShowWithWpf();

The StiWpfViewerControl lets you position the preview anywhere in your own WPF interface, while ShowWithWpf() is the quickest way to display a report without designing a window.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.