Using Viewer Events
Our sample projects and report templates can help you learn the basics of working with our products.The dashboard viewer exposes its events as component bindings — here the export event fires when the user exports the dashboard.
In Vue.
How it works. Each event is a component output, so your app reacts to what the user does in the viewer.
In Vue.
<script setup lang="ts">
import { Viewer, Stimulsoft } from 'stimulsoft-dashboards-js-vuejs/viewer'
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Dashboards/Dashboard.mrt");
var options = new Stimulsoft.Viewer.StiViewerOptions();
options.toolbar.showSendEmailButton = true;
function onBeginExportReport(args: Stimulsoft.Viewer.BeginExportReportArgs) {
alert("onBeginExportReport");
}
</script>
<template>
<Viewer :report="report" :options="options" @begin-export-report="onBeginExportReport" />
</template>onBeginExportReport— bound as a component event; the handler receivesBeginExportReportArgs.- Other events (print, data, design) bind the same way.
How it works. Each event is a component output, so your app reacts to what the user does in the viewer.