New to Telerik ReportingStart a 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:

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

Client API

MemberParametersDescription
PrintReport()N/AStarts 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/AReturns the number of the page currently shown in the viewer.
get_TotalPages()N/AReturns 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/ARefreshes 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/AShows the Document Map
HideDocumentMap()N/AHides the Document Map