When the user opens a different dashboard in the designer, it assigns a new report object — onAssignedReport lets you capture it.

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

@Component({
    imports: [Designer],
    template: `<sti-designer [(report)]="report" [options]="options" (onAssignedReport)="onAssignedReport($event)"></sti-designer>`
})
export class Example {
    report: Stimulsoft.Report.StiReport;
    options: Stimulsoft.Designer.StiDesignerOptions;

    onAssignedReport(args: Stimulsoft.Designer.AssignedReportArgs) {
        this.report = args.this.report;
    }

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

        this.options = new Stimulsoft.Designer.StiDesignerOptions();
        this.options.appearance.fullScreenMode = true;
    }
}

How it works. The event fires whenever the designer swaps its dashboard, so your component always holds the current one.

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