Datatypes

Datatypes are resources that define the format of a single-value input control, for example text or numerical value. The datatype determines what users can enter in the text field so that it corresponds to the type of the parameter in the report. Furthermore, the datatype can restrict the value, for example setting a range for a number or date, or enforcing a pattern such as an email address in strings. This is all controlled through the datatype associated with the input control.

Datatypes can represent one of four types:

Text
Number
Date
Date/time

To create a datatype resource:

1. Log on as an administrator.
2. Click View > Repository and expand the folder tree to locate the folder in which you want to create the datatype. If you installed the sample data, the suggested folder is Input Data Types.
3. Right-click the folder and select Add Resource > Datatype from the context menu.

The Add Datatype page appears.

Add Datatype Page

4. Enter a name and optional description for the datatype. The resource ID is filled in automatically.
5. Select the type of the datatype, as well as information related to the type.

In this example, select Text as the type of our datatype; you have other options as well:

     Text – For text datatypes, you can specify a regular expression in the Pattern field. The expression is used to validate the text that the user submits. For instance, you could enter an expression that tests for email addresses.
     Number – With numerical datatypes, you can control the range of acceptable values by specifying minimum and maximum values and whether the specified values are themselves acceptable (Minimum is Strict/Maximum is Strict check boxes). If a Strict check box is selected, the specified value is not acceptable.

For instance, for a percent field, you might specify a minimum of 0 and a maximum of 100. If you do not want to accept 0 percent, you would check Minimum is Strict. If you want to accept 100 percent, you would clear Maximum is Strict.

     Date and Date/Time – For these datatypes, there is a calendar widget in which you can select the desired minimum and maximum values and to make sure the configured date and date/time formats are used. To use the calendar, click the calendar icon .
6. When you have defined the properties of your datatype, click Save. The datatype resource appears in the repository.

This example creates a very basic datatype for any type of text input.

Version: 
Feedback