Set up the report viewer in .NET 8.0, load a template, and connect the component to the application.

Embedding the viewer control. Drop a StiViewerControl onto the form, then load and render a report and assign it to the control:
var report = new StiReport();
report.Load(@"Reports\SimpleList.mrt");
report.Render();
stiViewerControl1.Report = report;

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

The difference is control over the layout: the StiViewerControl lets you place the preview anywhere in your own interface, while Show() is the quickest way to display a report without designing a form.

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.