New to Telerik Reporting? Download free 30-day trial

Client-Side API Overview

This is a legacy report viewer and for new projects our recommendation is to use the latest WebForms Report Viewer - HTML5 Web Forms Report Viewer

Accessing the client-side report viewer object

The ReportViewer control creates a client-side object with the ClientID of the viewer. You can obtain reference to it by using the following code:

var viewer = `<%=ReportViewer1.ClientID%>`

Client API

Member Parameters Description
PrintReport() N/A Starts printing of the document. Uses the Adobe PDF Reader browser plug-in if available. Otherwise it exports the report to PDF.
set_CurrentPage(pageNumber) pageNumber: the number of the page(starts from 1). Specifies the number of the page which has to be displayed in the viewer.
get_CurrentPage() N/A Returns the number of the page currently shown in the viewer.
get_TotalPages() N/A Returns the total count of document pages.
CanMoveToPage(pageNumber) pageNumber : the number of the page(starts from 1). Checks whether it is possible to navigate to the specified page.
RefreshReport() N/A Refreshes the report.
ExportReport(format) The available formats are listed in the Export Formats article. Exports the document to one of the specified formats.
PrintAs(format) format:
  • "PDF": uses the Adobe PDF Reader add-on.
  • "Default": uses the default printing capabilities of the browser.
Forces the viewer to print the document according to the specified print format.
ShowDocumentMap() N/A Shows the Document Map
HideDocumentMap() N/A Hides the Document Map
In this article