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

Set variables, then bind the viewer.
<script setup lang="ts">
import { Viewer, Stimulsoft } from 'stimulsoft-reports-js-vuejs/viewer'

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"));
</script>

<template>
    <Viewer :report="report" />
</template>

How it works. Values are set on the report before it is bound 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.