SQL query parameters can be set from code in the onBeginProcessData event before the data request runs.

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

Stimulsoft.StiOptions.WebServer.url = "http://localhost:9615/";

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

report.onBeginProcessData = function (args) {
    // Change SQL query parameters before the request
    if (args.dataSource === "products") {
        args.parameters[0].value = "8";
    }
};
</script>

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

How it works. The parameter is applied before the SQL runs, so filters stay on the server side.

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.