Using the two Viewer in the One Project
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.Two independent dashboard viewers can live on one page, each bound to its own report object.
In Vue.
How it works. The viewer is a self-contained component, so any number can be placed on a page, each with a separate dashboard.
In Vue.
<script setup lang="ts">
import { Viewer, Stimulsoft } from "stimulsoft-dashboards-js-vuejs/viewer";
var report1 = new Stimulsoft.Report.StiReport();
report1.loadFile("Dashboards/Dashboard.mrt");
var report2 = new Stimulsoft.Report.StiReport();
report2.loadFile("Dashboards/Orders.mrt");
</script>
<template>
<Viewer :report="report1" />
<Viewer :report="report2" />
</template>- Each
Viewergets its ownStiReport, so the two dashboards render and operate independently. - The components share no state — loading or interacting with one does not affect the other.
How it works. The viewer is a self-contained component, so any number can be placed on a page, each with a separate dashboard.