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.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.