TOC : Script API > JavaScript > JavaScript API > Component > ReportTemplate > Method >

 

GetCurrentPage

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

TOC : Script API > JavaScript > JavaScript API > Component > ReportTemplate > Method >

 

GetCurrentPage

 

 

Gets the current page object.

 

 

 

Prototype :

 

object GetCurrentPage

(

       No Arguments

)

 

 

 

Reference :

 

Use to get the currently displayed page object of a component executing OnEndBind when it has been bound by report preview. GetCurrentPage() is called in that component, not in the report template(not create in the script edit window of the report template).

 

 

 

Example :

 

//get the current page from OnEndBind of a label and export pages if label's text matches PDF and XLS

  var objPage = ReportTemplate.GetCurrentPage();

  if(objPage != null)

     objPage.SetExportFileName("PDF,XLS", "", This.GetText());

  }

 

 

 

Available Events :

 

OnAddToPage,  OnCheckValidity,  OnClick,  OnEndBind,  OnExternalEvent,  OnFocus,  OnKillFocus,  OnLocationUpdated,  OnResponse,  OnValueChanged