Native custom controls

Starting with Cognos® Analytics 12.0.3, custom controls can be added directly to the Insertable objects toolbox. This can be done by creating and uploading an extension for the custom control.

After the extension is uploaded in Manage, it becomes available on the Toolbox tab as a first class Reporting object that can be added to the report.

Follow this process to implement native custom controls:

  1. Create an extension.

    The extension contains the following details:

    • The location in the Toolbox where the control appears.
    • The control name, tooltip (description), and icon.
    • The JavaScript Module path property.
    • The design mode JavaScript module.

    The extension is packaged as a .zip file.

    The sample extension Native_Custom_Control_Popup is included with the Cognos Analytics base samples deployment.

    For more information, see the JavaScript API documentation Native Custom Controls (https://ibm.biz/NativeCCDocs).

  2. Upload the extension.

    To upload the extension, in Manage > Customization > Extensions, click Upload extension Upload an extension, and select the extension .zip file.

    For more information, see Extensions.

  3. Access the custom control on the Toolbox tab.

    The custom control is available in one of the groups on the Toolbox tab, as specified by the developer in the extension.

    The sample Native_Custom_Control_Popup extension implements a custom control named Popup, as shown in the following image:

    Sample custom control

    To view how the Popup custom control is used, open the sample report Native Custom Control Popup in Team content > Samples > By feature > Custom controls.

  4. Add the custom control to a page in the report.