In this section: |
You can insert controls in an HTML page or a Guided Report page using the Controls tab and group. The controls are Edit Box, Hidden, Drop Down, List Box, Double list, Radio Button, Check Box, Text area, Tree, Calendar, and Slider.
In this section: How to: |
You can use the Controls tab and group to insert controls in an HTML page or a Guided Report page. Controls enable you to prompt users for a parameter value. When you create a parameter as part of a report or graph, the HTML canvas automatically adds a control, Submit button, and Reset button for the parameter to your layout, and the parameter appears on the Parameters tab. You can also add an input control and bind it to a parameter.
Controls, with the exception of a text box which does not supply a list of possible values, can supply values with a dynamic or static list of values:
An active report control lists active report values that mimic active report menu items. The active report controls cannot be associated to any parameters in the layout. This type of control can only be associated with an active report in the layout.
The properties of a control, as well as the parameters associated with each control, can be controlled with the Properties tab of the Properties window, and with the Parameters tab. The Controls tab is shown in the following image.
The controls are:
Inserts a text box. A text box enables you to enter a value in an entry field. You can specify a list of static or dynamic accepted values in Settings panel and, at runtime, when you type the first letter of a value into the text box, that value will be listed as an autocomplete suggestion.
Inserts a hidden control. A hidden input control allows parameter values to be used in a control without the user seeing them. When a hidden control is used, the current input control assigned to the parameter will not be visible. The value of the parameter can be entered in the Properties and settings dialog box of the Parameters tab, or supplied through chaining.
Inserts a drop-down list. 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.
Inserts a list. This enables you to select single or multiple values at one time:
A single-select list enables you to select only one value for each time a request is run.
A multi-select list enables you to select multiple values by using the Ctrl key while selecting values.
In order to provide multiple values, the procedure must be set up to accept multiple values.
List box values can be dynamic or static.
Inserts a double list. Displays multi-select 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.
Inserts a radio button. Radio buttons enable you to select a single value from a list of supplied values. Radio button values can be static or dynamic.
Inserts a check box. Check boxes enable you to select a single value from a list of supplied values. Note that if there are multiple check box input controls that are grouped together, you may select the Multiple properties for each control. Multiple ensures that you can select a single value from each check box control. Check box list values can be dynamic or static.
Inserts a text area. 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. You can specify a list of values in the Settings panel and, at runtime, when the first letter
Inserts either a single-source tree control or multi-source tree control. By using a tree structure in an HTML report, you can show hierarchical data from a multi-dimensional data source (for example, SAP BW), that uses the parent/child model. You may also use a tree control for non-hierarchical data sources. Level hierarchies are not supported. The behavior of the tree control is integrated with the parameter definition. If a parameter is defined as a single value and that parameter is bound to a tree control, the tree control uses option buttons for each node in the hierarchy. If the parameter is defined as Multiselect OR or Multiselect AND, and that parameter is bound to a tree control, then the tree control uses check boxes for each node in the hierarchy, enabling you to select multiple nodes.
Inserts a calendar. Date parameters can utilize a built-in calendar control that enables you to select the desired date or range of dates in a pop-up dynamic calendar. A procedure that is added to or referenced in the HTML canvas and contains date parameters will have a Calendar control type available in the Properties tab of the Properties window. When the Calendar control type is selected, a text box with a calendar icon will display in the Design view of the layout. The text box is the only control available for the calendar, and the icon will always display to the right of the text box. The icon cannot be positioned independently from the text box. Note that when programmatically returning a date to the calendar, the date must be in a WebFOCUS date format that specifies the complete date from the list of supported data types in Calendar Properties.
Inserts a horizontal or vertical slider control that has a numeric range of values to be used with a report or chart. This enables you to use a slider bar to select from a range of values.
The pointer changes to a crosshair.
A calendar placeholder is created in the layout and assigned the name calendar(n), where (n) is a number.
Binding a parameter to a calendar creates an incoming parameter. An incoming parameter is a parameter that is bound to a control. If binding a parameter to a calendar, the parameter value must be in a WebFOCUS date format that specifies the complete date from the list of supported data types in Calendar Properties. The parameter value will populate the calendar with date values.
Binding the calendar to a parameter will populate the parameter with a date value.
The Settings panel opens, showing the calendar setup options. The calendar setup options enable you to set the range of dates available to the user at run time. Available dates will be represented as an active hyperlink (blue and underlined) and unavailable dates will be static (black without underlines).
Note: The Settings panel for a calendar will contain different options depending on the selected data type.
When the Current/Start date option is checked, the current date will be used in the calendar control at run time.
The Date Range options for setting up the calendar include:
The pop-up calendar icon appears in the From and To sections when the Static Date Range is selected. If you click the pop-up calendar icon, a pop-up calendar appears and shows the current date selected and circled in red by default. As you scroll through the calendar with the left/right arrows, the currently selected day will remain highlighted for each month. Clicking a date will add that date to the control. Dates can be selected by scrolling left to right, entering the month, day, and year as text, or by selecting the month, day, and year from the drop-down list and spin boxes.
A double-head slider control is a new control you can access from the HTML canvas. A double-head slider control is a type of slider control in which you can select a range of values for displaying data in a report or chart. Rather than having one slider head, you have two. In order to use a double-head slider control, you must have two variables in the report or chart that will be controlled by the double-head slider control. One variable will be controlled by one head of the double-head slider control and the other variable will be controlled by the other head of the double-head slider control. The variables need to be specified in the procedure as FROM and TO.
Note: You can use the Report canvas to create a parameter that accepts a range of values using the Expression Builder dialog box. The Chart canvas requires you to manually create a parameter that accepts a range of values.
The Expression Builder dialog box opens.
This indicates the parameter you are creating is a range of values.
In the Range Builder dialog box, you can name the parameters you will use for the Double-head slider control or select a field whose values you want to create a range from.
This is the FROM value.
This is the TO value.
These are the names of the two parameters that will be controlled by the double-head slider control.
This report can now be used with a double-head slider control once you set up your HTML page.
Your mouse becomes a crosshair.
Changing the Range property to Yes changes the single-head slider control to a double-head slider control. You can now use this control to select a range of values to display.
Your mouse becomes a crosshair.
Note that the Control Type for the second parameter changes to Append to Above. This means that the second parameter has been recognized as being part of a range and will be controlled by the double-head slider control specified in the first parameter.
The New Parameters dialog box opens.
Note that the Control Type for the second parameter changes to Append to Above. This means that the second parameter has been recognized as being part of a range and will be controlled by the double-head slider control specified in the first parameter.
The double-head slider control controls what you see in your report or chart by allowing you to select a range of values rather than one specific value or all values. The first head updates the FROM value and the second head updates the TO value.
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.
The value being entered appears as masked text.
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 multi-select 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.
For example, create a report with Multiselect OR as the variable type for the parameter, accepting a dynamic list of values from a Master File.
A drop-down list is created in the layout and assigned the name combobox(n), where (n) is a number.
This indicates that multiple items can be selected from the drop-down list.
Select multiple values by using the Ctrl key while selecting values from the drop-down list.
The drop-down list shows the selected multiple values. Click the Run button to run the report with the selected value parameters.
This procedure describes how to add a tree control for a multi-dimensional data source, using an embedded procedure.
Tip: You may select Single source Tree control or Multi source Tree control. If no type is selected, Single source Tree control is the default, as shown in the following image.
The pointer changes to a crosshair.
A tree control is created in the layout and assigned the name treecontrol(n), where (n) is a number. Additionally, the Settings panel appears for the tree control.
The Open dialog box opens.
The multi-dimensional data source is added as the embedded procedure.
The Value field is the data source field from which the values will be retrieved.
The Display field is the text that represents the parameter value in the tree control.
You can select an existing procedure to add to the tree control in an HTML page. When you select a procedure, it should use fields from the parent/child hierarchy and be set up as follows:
TABLE FILE file SUM FST.dispfield BY ParentUniqueField BY UniqueField BY datafield ON TABLE PCHOLD FORMAT XML END
where:
Is the name of the data source.
Is the field whose values display in the tree control.
Is the field that represents the parent for the parent/child hierarchy (PROPERTY = PARENT_OF).
Is the field that represents the unique IDs for the hierarchy members (PROPERTY=UID).
Is the field whose values are passed as the parameter value.
After the procedure is set up, follow these steps:
Tip: You may select Single source Tree control or Multi source Tree control. If no type is selected, Single source Tree control is the default.
The pointer changes to a crosshair.
A tree control is created in the layout and assigned the name treecontrol(n), where (n) is a number.
The Open dialog box opens.
The procedure name is added as the external procedure.
The Value field is the data source field from which the values will be retrieved.
The Display field is the text that represents the parameter value in the tree control.
You can show a tree structure for a non-hierarchical data source by using a tree control. By identifying the number of levels for the tree control, you are able to populate each level of the tree control with its own procedure. Setting the number of levels creates a tree structure by which each level is its own subcontrol, chained together with no conditions.
This procedure describes how to add parameters for a tree control, where the number of levels property is set.
The pointer changes to a crosshair.
A tree control is created in the layout and assigned the name treecontrol(n), where (n) is a number.
This enables you to specify the number of levels to populate.
The tree control object shows the set number of levels.
When creating a Multi source Tree control, the static data type is not available. If creating static values for the tree control, you must create a single source tree control.
Note: Add level only appears for a Multi source tree control object.
Note that the Properties window drop-down list for the tree control shows each level of input values.
Note: If a user selects a lower level node in one level and a higher level node in another level, when the procedure is executed, only the lowest level selections will take effect. For example, you have 3 levels: COUNTRY, CAR, and MODEL. Under ENGLAND, TRIUMPH you select TR7. Under FRANCE, you select PEUGEOT. At run-time you will only receive the records for TR7 because you did not select a MODEL under the FRANCE node.
The tree control populates each level with values.
Note: A value must be selected for each level before you can click the Save Selection button.
If a selected value is specified for a field that is not in level1, then corresponding selected values must also be specified for the preceding levels.
Only the first and second levels load at run time. If a selected value is specified for a field in level1, only values from the first two levels will be selected.
This procedure describes how to add static data type parameters for a tree control, where the Number of levels property for the tree control is not set. This enables you to add a static list of values.
Static is selected by default. You may select an item, delete it, or add a subitem.
Repeat these steps until the list contains all of the values you want to include.
When a report contains one or more new amper variable parameters, the New Parameters dialog box opens when you save the report and return to the HTML canvas. You can assign a new Single source or Multi source Tree control from the HTML page to the parameter from the New Parameters dialog box.
For each parameter, you will find Name and Control Type fields, a Create control check box, and options to set the Control Type to a Single source or Multi source Tree control.
When importing a report with parameters, the New Parameters dialog box opens, prompting you to create the control type.
The Control Type column refreshes, showing the selected control.
The report is added and the associated parameters are bound to the tree control.
The following usage notes apply when chaining tree controls. You may chain controls from the New Parameters dialog box and from the Parameters tab.
WebFOCUS |