Jump to content
JasperReports Library 7.0 is now available ×
  • This documentation is an older version of JasperReports Server Visualize.js Guide. View the latest documentation.

    The inputControls function prepares and displays input controls for reports that your users interact with.

    This chapter contains the following sections:

    Input Control Properties
    Input Control Functions
    Input Control Structure
    Fetching Input Control Data
    Creating Input Control Widgets
    Cascading Input Controls
    Reusing Input Control Instances
    Reusing Input Control Data

    Input Control Properties

    The properties structure passed to the inputControls function is defined as follows:

    Input Control Functions

    The InputControls function exposes the following functions:

    Input Control Structure

    InputControls data() is an array of InputControl objects, with the structure shown in this example:

    Fetching Input Control Data

    The data being output here has the input control structure shown in the previous section:

    This example shows an alternate way of fetching input controls:

    Creating Input Control Widgets

    This example retrieves the input controls of a report and parses the structure to create drop-down option menus of values for each control:

    Cascading Input Controls

    In order to implement cascading input controls, you must implement a change listener on the parent control and use it to trigger an update on the dependent control:

    Associated HTML:

    Reusing Input Control Instances

    Input controls are meant to be dynamic and modified by users. By using the inputControls.params function, you can update the values of input controls and then update the corresponding report.

    Reusing Input Control Data

    It is possible to store the data from the inputControls function and access the data() structure at a later time:


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...