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 javascript code:
var viewer = <%=ReportViewer1.ClientID%>
Client API
Member |
Parameters |
Description |
PrintReport() |
N/A |
Starts printing of the document. Uses the Adobe PDF Reader browser add-on if available. Otherwise uses the default print functionality of the browser. |
set_CurrentPage(pageNumber) |
pageNumber: number of the page(starts from 1). |
Specifies the number of the page which has to be displayed in the viewer. |
get_CurrentPage() |
|
Returns the number of the page currently shown in the viewer. |
get_TotalPages() |
|
Returns the total count of document pages. |
CanMoveToPage(pageNumber) |
pageNumber: the number of the page to which you want to navigate. |
Checks whether is possible to navigate to a specific page. |
RefreshReport() |
N/A |
Refreshes the report. |
ExportReport(format) |
The available formats are listed in the Rendering Extensions 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() |
|
Shows the DocumentMap |
| HideDocumentMap() |
|
Hides the DocumentMap |