Skip to main content
A newer version of this page is available. .

Reporting for Angular

  • 2 minutes to read

Topics in this section describe how to create reporting applications based on the Angular framework.

Document Viewer

Quick Start

Customization

Report Designer

Quick Start

Client-Side API

To access the client-side Reporting API in Angular applications, use the following objects:

To handle client-side events, use callbacks with the same name in the Knockout bindings. The following code snippet illustrates how to use the CustomizeExportOptions callback to remove the XLS format from the Export To drop-down list and from the Export Options panel:

 

report-viewer.html

<div>
    <dx-report-viewer [reportUrl]="reportUrl" height="800px">
        <dxrv-request-options [invokeAction]="invokeAction" [host]="hostUrl">
        </dxrv-request-options>
        <dxrv-callbacks (CustomizeExportOptions)="OnCustomizeExportOptions($event)">
        </dxrv-callbacks>
    </dx-report-viewer>
</div>

 

report-viewer.ts

import { Component, Inject, ViewEncapsulation, ViewChild } from '@angular/core';
import { DxReportViewerComponent } from 'devexpress-reporting-angular';
import DevExpress from 'devexpress-reporting/dx-webdocumentviewer'

@Component({
// ...
})
export class ReportViewerComponent {
    @ViewChild(DxReportViewerComponent, { static: false }) viewer: DxReportViewerComponent;
    reportUrl: string = "TestReport";
    invokeAction: string = '/DXXRDV';

    OnCustomizeExportOptions(event) {
        event.args.HideFormat(DevExpress.Reporting.Viewer.ExportFormatID.XLS);
    }

  constructor(@Inject('BASE_URL') public hostUrl: string) { }
}