Showing a Report in the Viewer
Our sample projects and report templates can help you learn the basics of working with our products.In a Wisej.NET web app the Reports.JS viewer is hosted in an HTML control, built in JavaScript on load.
Build the viewer on page load.
How it works. Wisej hosts the HTML page; the viewer runs client-side, so a C# web app shows Stimulsoft reports without a server-side rendering step.
Build the viewer on page load.
<script src="Scripts/stimulsoft.reports.js"></script>
<script src="Scripts/stimulsoft.viewer.js"></script>
<script type="text/javascript">
function onLoad() {
var viewer = new Stimulsoft.Viewer.StiViewer(new Stimulsoft.Viewer.StiViewerOptions(), "StiViewer", false);
viewer.renderHtml("content");
var report = new Stimulsoft.Report.StiReport();
report.loadFile("/Reports/SimpleList.mrt");
viewer.report = report;
}
</script>StiViewer(options, id, false)— the client viewer;renderHtml("content")mounts it into the control's element.report.loadFile("/Reports/SimpleList.mrt")— loads a template served by the Wisej app.
How it works. Wisej hosts the HTML page; the viewer runs client-side, so a C# web app shows Stimulsoft reports without a server-side rendering step.