Progress® Telerik® Reporting R2 2017

Methods

Each method can be called using a reference to the report viewer component.

TypeScript
<tr-viewer #viewer1

...

<button (click)="viewer1.refreshReport()">Refresh</button>

The example above refreshes the report viewer.

The following table lists the available methods:

Method

Description

refreshReport()

Reloads/refreshes the current report.

Returns: the current ReportViewer object.

getReportSource(): any

Gets the current ReportSource - report and parameters.

Returns: object with properties:

  • report: string

  • parameters: JSON

setReportSource(rs: JSON)

Sets the report source - report and parameters. Automatically reloads the report (if any) into the view.

Parameters: rs; rs is an object with the following properties:

  • report: string

  • parameters: JSON

Returns: the current ReportViewer object.

getViewMode(): string

Gets the current view mode.

Returns: string.

setViewMode(vm: string)

Sets the view mode and automatically reloads the current report (if any) into the new view.

Parameters: vm: string

Returns: the current ReportViewer object.

getScale(): any

Gets the viewer’s scale factor and scale mode.

Returns: object with properties:

  • scale: number

  • scaleMode: string

setScale(scale: any)

Sets the scale factor and scale mode.

Parameters: scale; scale is an object with the following properties:

  • scale: number

  • scaleMode: string

Returns: the current ReportViewer object.

pageCount(): number

Gets the total page count of viewer’s currently displayed report.

Returns: number.

currentPage(): number

Gets the viewer’s current page that is displayed.

Returns: number.