Show Report Viewer in Desired PositionThis example shows how to create a report viewer and show it in desired position. If you want to disable the automatic rendering of the viewer content after creation, set the third parameter of the constructor to false. In this case, the object viewer will be created in memory:
// Create the report viewer with default options
var viewer = new Stimulsoft.Viewer.StiViewer(null, "StiViewer", false);
To display the report viewer you can use the viewer.renderHtml() method, viewer renders its own content in the place, in which this method was called:
// Show the report viewer in this place
Also you can render the viewer content into the specified HTML element, for example DIV. For this you can use the viewer.renderHtml("elementId") method:
// Show the report viewer in specified element
In the screenshot below you can see the result of the sample code.