Input Controls (2024)

Any JasperReport can be parameterized so that its generated output is a function of values given at runtime (query filters), or so that its layout is changed to accommodate different users (such as changing the title).

When writing JRXML, you can declare parameters and accommodate any runtime value that needs to be passed into the query executor, the rendering engine, or the calculation engine. However, the parameter information in a JRXML file does not provide everything JasperReports Server needs to build a complete user interface and prompt users for values. You must also define an input control resource that defines the following:

The range of possible values or list of discrete values allowed.
The type of input, for example single-select or multi-select, and the widget to display the possible values, for example drop-down list or check boxes.
Display options such as labels and whether the value is required.
The name of the corresponding parameter in the JRXML.

When a user runs the report, the server uses this information to prompt the user for a value and to validate that input. For example, consider a report that returns sales data for all of a company’s products; the user might input a product to view by selecting a product name in a list.

JasperReports Server supports several types of input controls, each of which can map to certain types of parameters in the report’s JRXML. The input control also determines the kind of widget the user interacts with:

Boolean – Presented as a check box. These input controls return a java.lang.Boolean object to the report engine in response to the user’s selection. Boolean input controls return .TRUE or FALSE as values, depending on whether the box is checked.
Single value – Presented as a free-form text box. You must specify a datatype, for example text or numerical value, and the user’s entry is validated against this datatype.
Single-select – Presented either as a drop-down list or a set of radio buttons. A single-select input control returns a single value.
Multi-select – Presented as a scrollable list of values or a set of check boxes. A multi-select input control returns a collection of values.

One advanced feature of single-select or multi-select input controls is that the values they present can be the result of a dynamic query. The query retrieves actual values from the data source before presenting them as choices to the user. These queries can contain parameters themselves, for example based on the logged-in user or the selection of a previous input control. Query parameters are described in the JasperReports Server Ultimate Guide.

Input controls rely on other resources in the repository, such as datatypes, static lists of values, or queries. You can manage these resources the same way you manage other resources. You can define them locally (available only to the input control) or reference them externally (reusing a resource in the repository). For more information, see Local Resources and External References.

Input Controls (1)

Ad Hoc views based on Domains and Domain Topics always use locally defined input controls that are created automatically based on the chosen filters. They cannot refer to input controls stored in the repository, and you should not modify them. For more information, see the JasperReports Server User Guide.

Some input controls rely on queries to populate their options. These more complex controls are described in Query-based Input Controls.

As with other resources, input controls can be created locally as part of a JasperReport, in which case they cannot be seen outside that JasperReport, or they can be created separately in the repository and referenced in multiple reports.

To use an input control in a report, the control must meet two conditions:

The parameter name in the input control must correspond to the name of the parameter in the report. No error occurs for a mismatch, but at runtime NULL is passed instead of actual value of the parameter.
The input control and its corresponding parameter must be of compatible datatypes (for example, both must be text types or date types). If there is a mismatch, the report fails and an exception is returned.

This section explains how to create an input control in the repository. To reference input controls in a JasperReport, see the JasperReports Server User Guide.

To create an input control:

1. Log on as an administrator.
2. Click View > Repository and locate the folder for the input control. If you installed the sample data, the suggested folder is Input Data Types.
3. Right click the folder's name and select Add Resource > Input Control from the context menu. The Add Input Control page appears.

Input Controls (2)

Add Input Control Page

4. Select the type of input control from the Type list. In this example, Single Value is selected.
5. Enter the prompt to tell users how to use the control. This example, uses the prompt Select the text for the report title.
6. In practice, the prompt text is often the same as the parameter, so the parameter name is automatically filled in. If you have used a different prompt, edit the Parameter Name field and enter the exact name of the parameter for your control. Remember, the parameter name must be the same here as in the reports that use this input control.

For this example, the parameter name is title. Description is optional.

7. Select options for the control. Your options are:
Mandatory – Forces the end user to supply a value.
Read-only – Displays the value of the parameter without allowing the end user to modify it.
Visible – Makes the input control visible in the report options dialog.
8. Click Next.

Subsequent pages depend on what type of input control you chose:

Boolean types do not require any further information.
Single-value types require a datatype the user can enter.
Single-select and multi-select types based on static lists require a list of values.
Single-select and multi-select types based on queries require a query.
9. In this single-value example, the Locate Datatype page appears. Choose the option to select a datatype from the repository and click Browse. In the repository dialog, select /datatypes/TextGeneralDatatype, which is similar to the datatype we created in Datatypes.

Input Controls (3)

If you choose to define a datatype, the wizard takes you through the same procedure as in sectionDatatypes. You can then define any datatype you need, but it's local to the input control and not reusable in other input controls.

Input Controls (4)

Locate a Datatype for an Input Control

10. Click Next. The input control resource is created in the repository.
11. Locate the input control in the repository manager. Notice that the text of the prompt that you entered in step5 is also used as the name for the resource.
Input Controls (2024)

FAQs

Input Controls? ›

Input controls prevent users from entering unvalidated information into the system. These controls might require data to be entered in a given format or authorization on all inputs before adding them to the information system.

What are data input controls? ›

Data entry input controls are preventive controls that a company should have in place for systems that collect data across various business processes. Data entry input controls help maintain high integrity and quality of the data entered into the system so that processes can be executed properly.

What are the input controls in accounting? ›

Input controls prevent or detect errors when the system converts data from human-readable to computer-readable form. The forms of input controls are check digits, data validation, control totals and direct data entry procedures.

What are the examples of input application control? ›

Input Controls: Validation and Verification Techniques
Control DomainBrief Definition
Completeness ChecksEnsures all required data fields are entered.
Check DigitsAdds a digit to numbers to validate their authenticity.
Duplication ChecksPrevents entering the same information more than once.
12 more rows

What is an input control in business? ›

INPUT CONTROLS are computer controls designed to provide reasonable assurance that transactions are properly authorized before processed by the computer, accurately converted to machine readable form and recorded in the computer, that data files and transactions are not lost, added, duplicated or improperly changed, ...

What are the input controls? ›

Input controls are interactive elements of the interface which allow users to enter information into the system's interface. Examples - checkboxes, dropdown lists, list boxes, radio buttons, buttons, toggles, text fields, and date fields.

What is input controls in computer? ›

Input controls prevent users from entering unvalidated information into the system. These controls might require data to be entered in a given format or authorization on all inputs before adding them to the information system.

What is the objective of input controls? ›

Input Controls are used to obtain responses from the interview user. Each input control has certain attributes that vary according to the selected input control type.

What are the 7 accounting controls? ›

Document Information

The seven internal control procedures in accounting are: (1) separation of duties, (2) access controls, (3) physical audits, (4) standardized documentation, (5) trial balances, (6) periodic reconciliations, and (7) approval authority requirements.

What are the controls inputs and outputs? ›

Control Input and Output
  • The input or control input is a quantity that we can adjust directly. By adjusting the input, we hope to influence the output in a favorable way.
  • The output or process output is the quantity we want to control: we want the output to track the reference value (the setpoint).

What are input controls processing controls and output controls? ›

Input controls check data for accuracy and completeness when they enter the system. Processing controls establish that data are complete and accurate during updating. Output controls ensure that the results of computer processing are accurate, complete, and properly distributed.

What is an example of an input in an information system? ›

Input - the information entered into a computer system, examples include: typed text, mouse clicks, etc. Processing - the process of transforming input information into and output. Output – the visual, auditory, or tactile perceptions provided by the computer after processing the provided information.

What are three examples of input devices which can be used to input data? ›

The most common input devices are the keyboard, mouse, and touch screen. Portable keyboard, wireless mouse, and iPhone.

What are input controls in accounting information system? ›

Input controls check data for accuracy and completeness when they enter the system. There are specific input controls for input authorization, data conversion, data editing, and error handling. Processing controls establish that data are complete and accurate dur- ing updating.

What are input controls in a database? ›

Input controls is a control that provides reasonable assurance that transactions are properly authorized before processed by the computer. According to Senft and Gallegos (2009), input controls ensure authenticity, accuracy, completeness, and timeliness of data entered into an application.

What is an input control in business objects? ›

Input controls are used to filter and analyze the report data. You define input controls using text boxes and radio buttons.

What is an example of data control? ›

Examples of Data Control

Data Encryption: Encrypting information with an algorithm renders it illegible without the key or the appropriate permissions, significantly boosting data security. Data Masking: With data masking, sensitive information gets concealed by replacing actual characters with fictitious ones.

What are the data controls? ›

Data controls refer to the tactics, policies, and procedures that organizations use to meet their data governance and data management objectives. Put another way, they are the rules and systems that businesses rely on to ensure that only authorized users can access their data, ensuring its security and integrity.

What are the data input devices? ›

The most common input devices are the keyboard, mouse, and touch screen. Portable keyboard, wireless mouse, and iPhone. There are hundreds of other input devices, like microphones to capture sound waves, scanners to capture image data, and virtual reality devices to capture our body movements.

Top Articles
Latest Posts
Article information

Author: Nathanael Baumbach

Last Updated:

Views: 5672

Rating: 4.4 / 5 (55 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Nathanael Baumbach

Birthday: 1998-12-02

Address: Apt. 829 751 Glover View, West Orlando, IN 22436

Phone: +901025288581

Job: Internal IT Coordinator

Hobby: Gunsmithing, Motor sports, Flying, Skiing, Hooping, Lego building, Ice skating

Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.