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.
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.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.