Showing a Report in the Viewer
Our sample projects and report templates can help you learn the basics of working with our products.Set up the report viewer in .NET Framework, load a template, and connect the component to the application.
Embedding the viewer control. Drop a
Opening the report in a window. If you do not need an embedded control, call
The difference is control over the layout: the
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.