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

In Angular.
import { Component } from "@angular/core";
import { Viewer, Stimulsoft } from "stimulsoft-dashboards-js-angular/viewer";

@Component({
    imports: [Viewer],
    template: `<sti-viewer [report]="report"></sti-viewer>`
})
export class Example {
    report: Stimulsoft.Report.StiReport;

    constructor() {
        Stimulsoft.StiOptions.WebServer.url = "http://localhost:9615/";

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

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

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

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.