Progress® Telerik® Reporting R3 2018

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.

setAuthenticationToken(token: string)

Sets the authentication token.

Parameters: token: string

Returns: the current ReportViewer object.

getAccessibilityKeyMap(): JSON

Gets the shortcut keys used when the report viewer is in accessible mode (has its enableAccessibility set to true. The keys in the map are listed below:

Key

Default Value

Description

CONFIRM_KEY

13 ('enter')

Key for triggering the actions in the report content and previewing the report from the Preview button in parameters area, if available.

MENU_AREA_KEY

77 ('m')

Key for moving the focus to the menu area, if visible.

CONTENT_AREA_KEY

67 ('c')

Key for moving the focus to the report content area, if visible.

PARAMETERS_AREA_KEY

80 ('p')

Key for moving the focus to the parameters area, if visible.

DOCUMENT_MAP_AREA_KEY

68 ('d')

Key for moving the focus to the document map area, if visible.

setAccessibilityKeyMap(keyMap: JSON)

Sets the shortcut keys used when the report viewer is in accessible mode. It is recommended to set the new key map when the report rendering is complete, because the accessibility routines require the report viewer template to be loaded.

Parameters: keyMap: JSON

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy