The report viewer exposes various commands via the commands property.
The commands collection contains:
Each command is an object with the exec() method being the one that actually triggers the command. The other two methods, enabled() and checked() return a bool value and can be used prior to executing a command or to find in what state the UI for the command should be.
<tr-viewer #viewer1 ... <button (click)="viewer1.commands.print.exec()">Print</button>
The example above creates a Print button and in the click event handler invokes report viewer print command. Note that the exec() method of the command needs to be called. For more information please check the command article.
The following table is a list of all commands:
Goes back to the previously rendered report from history.
Goes forward to the previously rendered report from history.
Refreshes the report.
Goes to the first page of the report.
Goes to the previous page of the report.
Goes to a specific page of the report.
Goes to the next page of the report.
Goes to the last page of the report.
Toggles between Print Preview and Interactive view modes.
rendering extension name
Exports the report, using the respective rendering extension name.
Triggers the report printing.
Shows or hides the document map.
Shows or hides the parameters area.
Zoom-in the report.
Zoom-out the report.
Zoom with a specified ratio.
Changes the zoom mode of the report.
Shows or hides the side menu.