Using Input Controls to Supply Parameter Values

In this section:

 

Creating an input control from the Design view prompts you to create a bound parameter on the Parameters tab. Binding a control to a parameter will populate the parameter.

Note:


Top of page

x
Using a Text Box

How to:

Reference:

A text box enables you to enter a value in a text entry field.



x
Procedure: How to Create a Text Box

A text box only provides a single-select value.

  1. Add a text box by doing one of the following:
    • Click the Text Box button from the Components toolbar.

      or

    • From the Insert menu, select Controls, then click Text Box.

    The cursor changes to a crosshair.

  2. Drag the crosshair to create a text box and adjust it to the size you want.

    A text box is created in the layout and assigned the name edit(n), where n is a number.

  3. Optionally, change the properties of the text box by adjusting the properties displayed in the Properties tab of the Properties window. For details, see Text Box Properties in the Properties Window.
  4. To bind an existing parameter to the text box:

    Binding a parameter to a text box creates an incoming parameter. An incoming parameter is a parameter that is bound to a control. The parameter value will populate the text box with values.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Close the Properties and settings dialog box.

      Close this dialog since you are populating the text box with a parameter value.

    • Select the center of the parameter name object, left-click and drag the parameter to the center of the text box object, and release the mouse to complete the binding.
    • To unbind the parameter from the text box, select the arrow head on the line, so that the line is bold, right-click, and select Break binding.
  5. To bind the text box to a parameter:

    If binding a text box to a parameter, the value can only be single select. Binding the text box to a parameter will populate the parameter with the single value.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Create the single value for the text box. You can create a single Static or Dynamic value.
    • Close the Properties and settings dialog box to create the text box with the single value.
    • Bind the text box to a parameter. Select the center of the text box, left-click and drag the text box to the center of the parameter object, and release the mouse to complete the binding.


x
Procedure: How to Enter Masked Text in a Text Box

When entering a value in a text box at run time, you may set the mask text property so that the text is not displayed as text, but masked by default characters. This is recommended when using passwords or other sensitive information.

  1. Select the Text Box object to view the associated properties.

    You may also select the text box properties from the drop-down list of the Properties window. The properties for the text box appears as edit(n) <INPUT>.

  2. From the Mask text property field, select Yes.

  3. Run the report and enter a value in the text box.

The value being entered appears as masked text, as shown in the following image.



x
Reference: Text Box Properties in the Properties Window

When a text box is selected, the Properties tab in the Properties window contains options that control the properties of your text box.

Click a property to display a description of the selected property at the bottom of the Properties window.


Top of page

x
Using a Text Area

How to:

Reference:

A text area is a single-select control that enables you to enter multiple lines of text that can be assigned to a single variable. The behavior is similar to a text box, but you are not restricted to entering just one line of text. For example, if you want to assign a paragraph (multiple lines of text) to a variable that can be referenced by a procedure, you can add the paragraph to a text area from the Properties and settings dialog box on the Parameters tab.

Note: When the Multiple property is set for a text area control, you can enter data values separated by semicolons, commas, or carriage returns.

The following image shows the text area component in HTML Composer.



x
Procedure: How to Create a Text Area
  1. Click the Text Area button from the Components toolbar.

    or

    From the Insert menu, select Controls, then click Text Area.

    The cursor changes to a crosshair.

  2. Drag the crosshair to create a text area and adjust it to the size you want.

    A text area is created in the layout and assigned the name textarea(n), where n is a number.

  3. Optionally, you can change the properties of the text area in the Properties tab of the Properties window. For details, see Text Area Properties in the Properties Window.
  4. To bind an existing parameter to the text area:

    Binding a parameter to a text area creates an incoming parameter. An incoming parameter is a parameter that is bound to a control. The parameter value will populate the text area with values.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Close the Properties and settings dialog box.

      Close this dialog since you are populating the text area with a parameter value.

    • Select the center of the parameter name object, left-click and drag the parameter to the center of the text box object, and release the mouse to complete the binding.
    • To unbind the parameter from the text area, select the arrow head on the line, so that the line is bold, right-click, and select Break binding.
  5. To bind the text area to a parameter:

    If binding a text area to a parameter, the value can only be single select. You can create one or more lines of text for the single value. Binding the text area to a parameter will populate the parameter with the single value.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Create the single value for the text area. You can create a single Static or Dynamic value.

      Note: If you are creating a Static Data type for the text area, you may enter one or more lines of text by typing or pasting text into the Selected Value input field.

    • Close the Properties and settings dialog box to create the text area with the single value.
    • Bind the text area to a parameter. Select the center of the text area, left-click and drag the text area to the center of the parameter object, and release the mouse to complete the binding.


x
Reference: Text Area Properties in the Properties Window

When a text area is selected, the Properties tab in the Properties window contains options that control the properties of your text area.

Click a property to display a description of the selected property at the bottom of the Properties window.


Top of page

x
Using a Drop-Down List

How to:

Reference:

A drop-down list enables you to select a single value from a list of supplied values. You can use a dynamic or static list of values for the drop-down list.



x
Procedure: How to Add a Drop-Down List
  1. Add a drop-down list by doing one of the following:
    • Click the Drop Down List button from the Components toolbar.

      or

    • From the Insert menu, select Controls, then click Drop Down List.

    The cursor changes to a crosshair.

  2. Drag the crosshair to create a drop-down list, and adjust it to the size you want.

    A drop-down list is created in the layout and assigned the name combobox(n), where n is a number.

  3. Optionally, change the drop-down list properties by adjusting the properties displayed in the Properties tab of the Properties window. For details, see Drop-Down List Properties in the Properties Window.
  4. Binding a parameter to a drop-down list creates an incoming parameter. An incoming parameter is a parameter that is bound to a control. The parameter value will populate the drop-down list with values. To bind an existing parameter to the drop-down list:
    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Close the Properties and settings dialog box.

      Close this dialog since you are populating the drop-down list with a parameter value.

    • Select the center of the parameter name object, left-click and drag the parameter to the center of the drop-down list object, and release the mouse to complete the binding.
    • To unbind the parameter from the drop-down list, select the arrow head on the line, so that the line is bold, right-click, and select Break binding.
  5. To bind the drop-down list to a parameter:

    Binding the drop-down list to a parameter will populate the parameter with a list of values.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Create the list of values for the drop-down list. You can create a list of Static or Dynamic values.
    • Close the Properties and settings dialog box to create the text box with the list of values.
    • Bind the text box to a parameter. Select the center of the text box, left-click and drag the text box to the center of the parameter object, and release the mouse to complete the binding.


x
Procedure: How to Select Multiple Values From a Drop-Down List

When using a drop-down list input control to supply parameter values, the Multiple property value indicates whether multiple values can be selected from a list of supplied values at run time.

Note: A multiselect list enables you to select multiple values by using the Ctrl key while selecting values. In order to select multiple values in the drop-down list, the procedure must be set up to accept multiple values. Ensure that the Variable Type for the parameter value is Multiselect OR or Multiselect AND in the procedure.

  1. From HTML Composer, insert a report with parameters that accept multiple values.

    For example, create a report with Multiselect OR as the variable type for the parameter, accepting a dynamic list of values from ggsales, with REGION as the value for returned and displayed fields.

  2. When the New Parameters dialog box appears, accept the default control type of Drop down list and click OK.

    A drop-down list is created in the layout and assigned the name combobox(n), where n is a number.

  3. Select Multiple from the Multiple drop-down list in the Properties tab of the Properties window.

    This indicates that multiple items can be selected from the drop-down list.

    Multiple property field for drop down list

  4. Save and run the HTML page.

    Select multiple values by using the Ctrl key while selecting values from the drop-down list, as shown in the following image.

    selecting multiple values with Ctrl

    The drop-down list shows the selected multiple values. Click the Run button to run the report with the selected value parameters.

    Drop down list showing selected multiple values



x
Reference: Drop-Down List Properties in the Properties Window

When a drop-down list is selected, the Properties tab in the Properties window contains options that control the properties of your drop-down list.

Click a property to display a description of the selected property at the bottom of the Properties window.


Top of page

x
Using a List Box

How to:

Reference:

A list box enables you to select single or multiple values at one time:

List box values can be dynamic or static.



x
Procedure: How to Add a List Box
  1. Add a list box by doing one of the following:
    • Click the List box button from the Components toolbar.

      or

    • From the Insert menu, select Controls, then click List Box.

    The cursor changes to a crosshair.

  2. Drag the crosshair to create a list box, and adjust it to the size you want.

    A list box is created in the layout and assigned the name listbox(n), where n is a number.

  3. Optionally, change the properties of the list box by adjusting the properties displayed in the Properties tab of the Properties window. For details, see List Box Properties in the Properties Window.
  4. Binding a parameter to a list box creates an incoming parameter. An incoming parameter is a parameter that is bound to a control. The parameter value will populate the list box with values. If binding a parameter to a list box, the value can be single or multiselect. To bind an existing parameter to the list box:
    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Close the Properties and settings dialog box.

      Close this dialog since you are populating the list box with a parameter value.

    • Select the center of the parameter name object, left-click and drag the parameter to the center of the list box object, and release the mouse to complete the binding.
    • To unbind the parameter from the drop-down list, select the arrow head on the line, so that the line is bold, right-click, and select Break binding.
  5. Bind the list box to a parameter.

    Binding the drop-down list to a parameter will populate the parameter with a list of values.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Create the list of values for the list box control. You can create a list of Static or Dynamic values.
    • Close the Properties and settings dialog box to create the list box with the list of values.
    • Bind the list box to a parameter. Select the center of the list box, left-click and drag the list box to the center of the parameter object, and release the mouse to complete the binding.


x
Reference: List Box Properties in the Properties Window

When a list box is selected, the Properties tab in the Properties window contains options that control the properties of the selected list box.

Click a property to display a description of the selected property at the bottom of the Properties window.



x
Procedure: How to Reorder the Selected Values in the List Box

When using a list box, you may reorder the selected values in the report.

  1. In the Design view of the HTML page, select the list box object, right-click, and select the Add Move Items control.

    An up and down arrow is added next to the list box control.

  2. Run the HTML page.
  3. Select values from the list box and run the report.
  4. To reorder the selected values, click the up arrow to move the selected value up in the list box, or click the down arrow to move the selected value down in the list box.
  5. Run the report again to view the results with the selected values.

    In the following example, CA is the first value in the By State list box. Select the down arrow to reorder the location of CA in the list box and rerun the report again.


Top of page

x
Using a Double List Control

How to:

Reference:

You may add a double list control for displaying multiselect values. This enables you to view a list of the available values and add or remove them from one list to another. At run time, a report is generated based on the values that are added.

Note: When creating a static list of values for a double list control, the add everything value option is not available.



x
Procedure: How to Add a Double List Control
  1. Add a double list control by doing one of the following:
    • From the Components toolbar, click the Double List Control button.

      or

    • From the Insert menu, select Controls, then click Double List Control.

    The cursor changes to a crosshair.

  2. Drag the crosshair to create a double list control, and adjust it to the size you want.

    A double list control is created in the layout and assigned the name customselect(n)_selectfrom and customselect(n)_selectto, where n is a number.

  3. You may edit the default description for the double list control by double-clicking Enter text, and typing the description of your choice.

  4. Optionally, change the double list control properties by adjusting the properties displayed in the Properties tab of the Properties window. For details, see Double List Box Properties in the Properties Window.
  5. Bind an existing parameter to the double list control.

    Binding a parameter to a double list control creates an incoming parameter. An incoming parameter is a parameter that is bound to a control. The parameter value will populate the double list control with values. If binding a parameter to a double list control, the value can be single or multiselect.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Close the Properties and settings dialog box.

      Close this dialog since you are populating the double list control with a parameter value.

    • Select the center of the parameter name object, left-click and drag the parameter to the center of the double list control object, and release the mouse to complete the binding.
    • To unbind the parameter from the double list control, select the arrow head on the line, so that the line is bold, right-click, and select Break binding.
  6. Bind the double list control to a parameter.

    Binding the double list control to a parameter will populate the parameter with a list of values.

    • Click the Parameters tab.

      The Properties and settings dialog box opens.

    • Create the list of values for the double list control. You can create a list of Static or Dynamic values.
    • Close the Properties and settings dialog box to create the double list control with the list of values.
    • Bind the double list control to a parameter. Select the center of the double list control, left-click and drag the double list control to the center of the parameter object, and release the mouse to complete the binding.

    Note: You can change the default double list control to other types of controls by right-clicking the control object on the Parameters tab or the Design tab and selecting Set Control Type.

    The options are Calendar, Check box, Drop down list, Hidden, List box, Radio button, Text area, Text box, Single source Tree control, and Multi source Tree control.

  7. Run the HTML page and select values by using the right and left arrows to add or remove values to the selected column.

    The selected values appear in the second column. The output is generated based on the selected values in the second column. In the following example, Action and Comedy are the selected values for the report.

  8. Optionally, you may reorder the selected values in the report.

    The up and down arrows reorder the selected values that appear in the second column of the double list control.

    Click the up arrow to move the selected value up in the second column of the double list control, or click the down arrow to move the selected value down in the double list control.



x
Reference: Double List Box Properties in the Properties Window

When a double list box is selected, the Properties tab in the Properties window contains properties of double list controls.

Keep Selected Value. When Yes is selected, this option will accumulate values you search for in the right-side box. When you search for another value, the previously searched values will not be deleted. No is selected by default.

Click a property to display a description of the selected property at the bottom of the Properties window.


Top of page

x
Adding a Paging Control in HTML Composer

How to:

You may add a paging control to a List Box, Drop Down List, and the first control of a Double List Control, which enables you to page through a large list of values before selecting a value. The Add 'Paging' control option is available through the right-click context menu