Dashboard variables can be assigned from code before rendering — handy for passing application state into a template.

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() {
        this.report = new Stimulsoft.Report.StiReport();
        this.report.loadFile("Dashboards/Variables.mrt");

        this.report.setVariable("Name", "Andrew");
        this.report.setVariable("Sex", true);
        this.report.setVariable("BirthDay", Stimulsoft.System.DateTime.fromString("10.10.2010"));
    }
}

How it works. Values are set on the report before it is bound to the viewer, so the dashboard reflects the application's state.

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