Report variables can be assigned from code before rendering — handy for passing application state into a template (React).

Set variables, then return the viewer.
function App() {
    var report = new Stimulsoft.Report.StiReport();
    report.loadFile('Reports/Variables.mrt');

    report.setVariable('Name', 'Andrew');
    report.setVariable('Sex', true);
    report.setVariable('BirthDay', Stimulsoft.System.DateTime.fromString('10.10.2010'));

    return <Viewer report={report} />;
}

How it works. Values are set on the report before it is passed to <Viewer>, so the rendered document reflects the application's state.

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.