Showing the Report Viewer in a Required Position
Our sample projects and report templates can help you learn the basics of working with our products.The viewer can be rendered into any element on the page so it fits your layout. This example draws it into a specific container.
Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
var viewer = new Stimulsoft.Viewer.StiViewer(null, "StiViewer", false);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("../reports/SimpleList.mrt");
viewer.report = report;
viewer.renderHtml("content"); // id of the target elementPassing an element id to renderHtml places the viewer inside that element, so you can size and position it with your own HTML and CSS — embedding the preview in a panel, tab or dialog.