A data connection can be built from code and added to the dashboard's dictionary, replacing whatever the template carried.

In Vue.
<script setup lang="ts">
import { Viewer, Stimulsoft } from 'stimulsoft-dashboards-js-vuejs/viewer'

var report = new Stimulsoft.Report.StiReport();
report.loadFile("Dashboards/Orders.mrt");
report.dictionary.clear();

var database = new Stimulsoft.Report.Dictionary.StiJsonDatabase("Orders", "Data/Orders.json");
report.dictionary.databases.add(database);
report.dictionary.synchronize();
</script>

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

How it works. The dashboard resolves its elements against the code-built connection, so its data source is defined entirely in code.

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.