The dashboard viewer exposes its events as component bindings — here the export event fires when the user exports the dashboard.

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

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

    onBeginExportReport(args: Stimulsoft.Viewer.BeginExportReportArgs) {
        alert("onBeginExportReport");
    }

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

        this.options = new Stimulsoft.Viewer.StiViewerOptions();
        this.options.toolbar.showSendEmailButton = true;
    }
}

How it works. Each event is a component output, so your app reacts to what the user does in the viewer.

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