Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
import { Viewer, Stimulsoft } from "stimulsoft-dashboards-js-react/viewer";
import { Designer } from "stimulsoft-dashboards-js-react/designer";
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Dashboards/Dashboard.mrt");
function App() {
const [isViewer, setIsViewer] = React.useState(true);
function onDesignReport(a) { setIsViewer(false); }
function onOpenedReport(a) { report = a.report; }
async function onExitDesigner() { await report.renderAsync2(); setIsViewer(true); }
function onAssignedReport(a) { report = a.report; }
return isViewer
? <Viewer report={report} onDesignReport={onDesignReport} onOpenedReport={onOpenedReport} />
: <Designer report={report} onExit={onExitDesigner} onAssignedReport={onAssignedReport} />;
}onDesignReport — the viewer's Design button; switch the flag to show the designer.onExit — the designer's Exit; re-render the dashboard and switch back to the viewer.