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.

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.