## Add User Defined Data Source dialog

This dialog appears when you right-click the User Defined node and select Add User Defined Data Source from its shortcut menu in the Catalog Browser. It is used to add user data source objects into a JReport catalog. See the dialog.

The following are details about options in the dialog:

Name

Specifies the name of the UDS. The name cannot be the same as any of the existing procedures, SQL files, HDSs, business cubes or queries. It also cannot be empty.

Class Name

Specifies the full name (including package name) of the class represented by the UDS. The class should be appended to the class path in the system environment.

The class implements

After filling in the Class Name field, the classname of the interface that the class implements will be displayed here.

Parameters

Specifies the parameter string for the UDS. The parameter string must match the format defined in the UDS class. You can use parameters predefined in a JReport catalog in the parameter string, and the format used in the string is "@" + parameter name. For example, if the parameter string of a UDS is SQL=select * from employee, and you want to use the parameter sql in a catalog to replace the part after "=" in the string, then the parameter string of the UDS will be SQL=@sql.

Edit Format

Opens the Edit Parameter Format dialog, in which you can edit the parameter format:

- Name
  Displays names of the parameters used in the UDS.
- Format
  Specifies formats for the parameters as required.
- OK
  Accepts changes and closes the dialog.
- Cancel
  Does not retain changes and closes the dialog.

Specify columns

Specifies the column definitions. If you don't specify the column definitions, JReport will retrieve them from result set.

- Name
  Specifies the valid name of the column. The name of the column should have the same validation with a common table column. The default names for column definitions are ‘column1', ‘column2'… etc.
- SQLType
  Specifies the data type of the column. The following types are supported:
  - String
    The corresponding JDBC type is VARCHAR or LONGVARCHAR.
  - java.math.BigDecimal
    The corresponding JDBC type is NUMERIC.
  - boolean
    The corresponding JDBC type is BIT.
  - byte
    The corresponding JDBC type is TINYINT.
  - short
    The corresponding JDBC type is SMALLINT.
  - int
    The corresponding JDBC type is INTEGER.
  - long
    The corresponding JDBC type is BIGINT.
  - float
    The corresponding JDBC type is REAL.
  - double
    The corresponding JDBC type is DOUBLE.
  - java.io.InputStream
    The corresponding JDBC type is VARBINARY or LONGVARBINARY.
  - java.sql.Date
    The corresponding JDBC type is DATE.
  - java.sql.Time
    The corresponding JDBC type is TIME.
  - java.sql.Timestamp
    The corresponding JDBC type is TIMESTAMP.
- Precision, Length, Scale, Radix
  Specifies the default value for each SQL type. Click the cell to modify the value if necessary.
- Nullable
  Specifies whether the value of the column can be null. X stands for No Nulls, √ stands for Nullable and ? stands for Nullable Unknown.

Adds a default row in the column definitions. If there is no row selected, an empty row will be added to the last line.

Removes the selected row.

Moves the selected column one step up.

Moves the selected column one step down.

OK

Adds the UDS and closes the dialog.

Cancel

Does not retain any changes and closes the dialog.

Help

Displays this help document.

###### Related topics:

- Adding a UDS to a catalog