Scriptable Reports

CustomControl

Interface to a Custom control. See Supported Controls for a list of controls that support this interface.
Containment

Extends

Members

(readonly) dataStores :Array.<DataStore>

The control's data stores. The order is the same as was authored.
Type:

(readonly) element :HTMLElement

The control's HTML element. No assumptions should be made about the element's type (nodeName) or contents.
Type:
  • HTMLElement
Inherited From:

(readonly) instance :Promise

The control's instance (the instance created from the module). Since modules are loaded asynchronously, the instance may not be immediately available, so a Promise is returned.
Type:
Examples

Obtain a reference to a single control's instance using the done method.

oControl.instance.done(
	function( oModuleInstance )
	{
		// The module instance is available here
	} );

Obtain a reference to multiple control instances using the all and done methods.

var aPromises = [oControl1.instance, oControl2.instance, oControl3.instance];
Q.all( aPromises ).done(
	function( aModuleInstances )
	{
		// The module instances are available here
	} );

(readonly) name :String

The control's authored name.
Type:
  • String
Inherited From:

Methods

getDataStore(sNameopt) → (nullable) {DataStore}

Get a control's data store by name. If the data store doesn't exist, null is returned.
Parameters:
Name Type Attributes Description
sName String <optional>
The name of the data set. If no name is passed, the first data store will be returned.
Returns:
The data store.
Type
DataStore

getDisplay() → {Boolean}

The display state of the control.
Inherited From:
Returns:
true if the control is displayed and false if the control is not displayed.
Type
Boolean

getVisible() → {Boolean}

The visibility state of the control.
Inherited From:
Returns:
true if the control is visible and false if the control is hidden.
Type
Boolean

setDisplay(bDisplay)

Set the display of the control.
Warning:
If the control is authored to be initially not displayed using the property "Box type" with a value of "None", this is treated like a conditional render so the report output will not contain the control. Use a "Box type" of "None-Block" or "None-Inline" instead.
Parameters:
Name Type Description
bDisplay Boolean Pass true to display and false to not display the control.
Inherited From:

setVisible(bVisible)

Set the visibility of the control.
Parameters:
Name Type Description
bVisible Boolean Pass true to show and false to hide the control.
Inherited From:

toggleDisplay()

Toggle the display of the control. See getDisplay and setDisplay for details.
Inherited From:

toggleVisibility()

Toggle the visibility of the control. See getVisible and setVisible for details.
Inherited From: