Showing a Report in the Viewer without Toolbar
Our sample projects and report templates can help you learn the basics of working with our products.Reports.JS provides ready-made React components in the stimulsoft-reports-js-react package, so you embed the viewer as a JSX element.
Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
The
Viewer setup. Configure the viewer, load the report, assign it to the component, and process the requests or events raised by the UI.
import { Viewer, Stimulsoft } from 'stimulsoft-reports-js-react/viewer';
function App() {
var report = new Stimulsoft.Report.StiReport();
report.loadFile('Reports/SimpleList.mrt');
var viewerOptions = new Stimulsoft.Viewer.StiViewerOptions();
viewerOptions.toolbar.visible = false;
return <Viewer options={viewerOptions} report={report} />;
}
export default App;The
<Viewer> component takes the report and an options object as props. Setting toolbar.visible = false hides the toolbar, giving a clean, read-only preview — the same StiViewerOptions used everywhere in Reports.JS.