Methods Overview
Each method can be called using a reference to the report viewer component.
<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:
|
||||||||||||||||||
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:
|
||||||||||||||||||
getReportParameters(): any | Returns an immutable array of name-value objects representing the current evaluated report parameters. Returns : array containing the name and the value of each report parameter. |
||||||||||||||||||
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:
|
||||||||||||||||||
setScale(scale: any) | Sets the scale factor and scale mode. Parameters : scale; scale is an object with the following properties:
|
||||||||||||||||||
getPageMode(): string | Gets the viewer’s page mode. Returns : string. |
||||||||||||||||||
setPageMode(psm: string) | Sets the page mode and automatically reloads the current report (if any) into the new view. Parameters : psm: string. Returns : the current ReportViewer object. |
||||||||||||||||||
clearReportSource() | Clears the current reportSource from the viewer internal state and from its persisted session in the browser. Called in order to force the viewer to respect the newly set reportSource on the next postback. | ||||||||||||||||||
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:
|
||||||||||||||||||
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 |
||||||||||||||||||
dispose() | Stops sending keep alive requests to the server, if keep client alive was enabled. |