### UDO

As the name suggests, a UDO is an object defined by users. It has special properties defined by users. The properties listed in JReport Report Inspector correspond with the ones defined your UDO programs. Here are some default properties:

Property Name | Description
--- | ---
General
Class Type | Indicates the class type of the object. This property is read only.
Geometry
Height | Specifies the height of the object, in inches or centimeters. Enter a numeric value to change the height. Data type: Float
Width | Specifies the width of the object, in inches or centimeters. Enter a numeric value to change the width. Data type: Float
X | Specifies the horizontal coordinate of the top left corner of the object, relative to its parent container. This property is ignored if the Position property is set to static. Enter a numeric value to change the position in inches or centimeters. Data type: Float
Y | Specifies the vertical coordinate of the top left corner of the object, relative to its parent container. This property is ignored if the Position property is set to static. Enter a numeric value to change the position in inches or centimeters. Data type: Float
Color
Background | Specifies the background color of the object. Choose a color from the drop-down list, enter a hexadecimal RGB value (e.g. 0xff0000) or choose a formula that returns a color. Data type: String
Foreground | Specifies the foreground color of the object. Choose a color from the drop-down list, enter a hexadecimal RGB value (e.g. 0xff0000) or choose a formula that returns a color. Data type: String
CSS
Class | Specifies a CSS class to be applied to the object which is a valid class in the CSS file. Data type: String
External CSS Class Selector | Specifies a class selector to be applied to the object when exported as HTML. Enter a valid class name from the CSS file. Data type: String
Style | The property can be used in two ways. Specifies a style to be applied to the object. Choose a style from the drop-down list which is available when a Style Group has been selected at the report level and when there are styles in the Style Group that can be applied to the object, or type in the style name. Specifies a CSS selector to be applied to the object. Enter a valid class name from the CSS file. Data type: String
Others
Export to CSV | Specifies whether to include the object when exporting the report to CSV. Data type: Boolean
Export to DHTML | Specifies whether to include the object when exporting the report to DHTML. Data type: Boolean
Export to Excel | Specifies whether to include the object when exporting the report to Excel. Data type: Boolean
Export to PDF | Specifies whether to include the object when exporting the report to PDF. This property is available only when a web control has been inserted into the object. Data type: Boolean
Invisible | Specifies whether to show the object in the design area and in the report results. All formulas and calculations will still be performed if the property is set to true. Data type: Boolean
Position | Specifies the position of the object. Choose an option from the drop-down list. static - The object is positioned at the location in which it is inserted. The X and Y properties are ignored. The position of the object is affected by preceding objects in the same container. relative - The object is positioned at an offset to the position at which it is inserted. The offset is determined by the X and Y property values. absolute - The object will be located at the position specified by dragging and dropping or by setting its X and Y property values. The position of the object is not affected by preceding objects in the same container. Data type: Enumeration Note: This property only affects objects with a parent container that is the report body, a tabular cell, or a text box.
Record Location | Specifies the calculation point for the properties which use formulas. Choose an option from the drop-down list. default - The values of the properties are calculated in the default location where they are located. Page Header - The values of the properties are calculated in the page header. Page Footer - The values of the properties are calculated in the page footer. Data type: Enumeration
Suppress | Specifies whether to show the object in the report results. All formulas and calculations will be skipped if the property is set to true. Data type: Boolean
Suppress When No Records | Specifies whether to display the object in the report results when no record is returned to its parent data container. Data type: Boolean
Excel
Column Index | Specifies the X coordinate of the object relative to its parent container when exported to Excel or CSV, measured in cells. The Columned property at the report level must be set to true for this property to take effect. Data type: Integer
Column Number | Specifies the number of columns which will be the object's width in the exported Excel file. The Columned property at the report level must be set to true for this property to take effect. Data type: Integer
Row Index | Specifies the Y coordinate of the object relative to its parent container when exported to Excel or CSV, measured in cells. The Columned property at the report level must be set to true for this property to take effect. Data type: Integer
Row Number | Specifies the number of rows which will be the object's height in the exported Excel file. The Columned property at the report level must be set to true for this property to take effect. Data type: Integer
Font
Bold | Specifies whether to make the text bold. Data type: Boolean
Font Face | Specifies the font of the text. Choose an option from the drop-down list. Data type: Enumeration
Font Size | Specifies the font size of the text. Enter an integer value to change the size. Data type: Integer
Italic | Specifies whether to make the text italic. Data type: Boolean

Notes:

- The above are the basic properties of a UDO and more will be added with those defined in your program.
- JReport UDO does not support RTF and PDF format output. That is, when exporting to RTF and PDF, a report with a UDO may not be rendered correctly. However, there is no such problem for HTML and PS.

#### Built-in UDOs

JReport provides you with two built-in UDOs: JHyperLink and JRotator.

##### JHyperLink

It operates in a similar way to the hyperlink in an HTML file (only for Windows NT). Here are its special properties:

Property Name | Description
--- | ---
Others
URL | Specifies the URL for accessing the linked file or website page. Data type: String
Executer Class Name | If the specified URL is linked to a .rst file - the JReport Result export result file, you should select jet.udos.RPTExecuter. For other links, use jet.udos.IEExecuter. Data type: String
Autofit | Specifies whether to adjust the width and height of the object according to the contents. Data type: Boolean
Target | Specifies the window or frame at which to target contents. Choose an option from the drop-down list. blank - Load the linked document into a new blank window. This window is not named. self - Load the linked document into the window in which the link was clicked (the active window). parent - Load the linked document into the immediate parent window of the active window. If there is no parent window, the active window is used. top - Load the linked document into the topmost window. Data type: Enumeration
Tooltips Text | Specifies the text that will be shown when you hover the mouse pointer over the JHyperLink in view mode or in HTML/DHTML result. Data type: String
Display Value | Specifies the displayed text of the hyperlink. This property has lower priority than Display Image. Data type: String
Vertical Alignment | Specifies the vertical justification of the contents in the JHyperLink container. Choose an option from the drop-down list. Data type: Enumeration
Horizontal Alignment | Specifies the horizontal justification of the contents in the JHyperLink container. Choose an option from the drop-down list. Data type: Enumeration
Word Wrap | Specifies whether to enable the word wrap function of JHyperlink in the exported files. Data type: Boolean
Enable Hyperlink in PDF | Specifies whether to enable the hyperlink when exporting the report to a PDF file. Data type: Boolean
Enable Hyperlink in Excel | Specifies whether to enable the hyperlink when exporting the report to an Excel file. Data type: Boolean
Enable Hyperlink in HTML | Specifies whether to enable the hyperlink when exporting the report to an HTML file. Data type: Boolean
HTML Style | Specifies the CSS style of JHyperLink in HTML/DHTML result. The value is a String value containing only the body part of a CSS style definition. Make sure that you input the right css style string. For Example, if a full style definition is: `style="text-decoration:underline;color:#0000ff; font: italic small-caps 600 19pts";` you need only input the content in the quotation marks as the HtmlStyle value: `text-decoration:underline;color:#0000ff; font: italic small-caps 600 19pts` Data type: String
Image
Display Image | Specifies the local path of the image displayed for the hyperlink (like a hotspot in HTML). This property has higher priority than Display Value. Data type: String
Original | Specifies from where the image is fetched when viewing or running the report in JReport Enterprise Server. The property has following two options: true - The image will not be delivered when publishing the report set to JReport Enterprise Server. The Server will find the image from the local directory specified by the property Display Image when you view the report. false - The image will be delivered when publishing the report to JReport Enterprise Server. The Server will obtain the image from the server side when you view or run the report. Data type: Boolean
Alternate Text | Specifies the text that will be displayed instead if the image cannot be displayed. Data type: String
Accessibility
External CSS Class Selector | Specifies a class selector to be applied to the object when exported as HTML. Enter a valid class name from the CSS file. Data type: String
External AccessKey | It is mapped to the HTML attribute accesskey. This attribute specifies an access key to the object. Data type: String
HrefLang | It is mapped to the HTML attribute hreflang. This attribute specifies the base language of the resource designated by a link and may only be used when a link is specified. Data type: String

Example:

Insert two JHyperLink UDOs, and specify the following:

- URL: `http://www.jinfonet.com`
  Display Value: Click here.
- URL: `C:\docword.txt`
  Display Value: abc
  Display Image: `C:\JReport\Designer\Demo\SampleReports\Coffee.jpg`

When you point your mouse at either UDO, a hand will show you that it is a hyperlink. By clicking it, you will be taken to the destination. The application launched to open it (the linked file) is from your Windows NT system. If Display Value and Display Image both have been specified, the image has the higher priority to be displayed.

##### JRotator

It is a built-in UDO that can be rotated. Text and images can be held in JRotator. Following are its special properties:

Property Name | Description
--- | ---
Rotate | Specifies the angle at which to rotate the JRotator, in degrees. 0 - No rotation. positive value - Rotate the JRotator clockwise. negative value - Rotate the JRotator anticlockwise. Data type: Integer
Display Value | Specifies the text displayed in the JRotator. This property has lower priority than Display Image. Data type: String
Display Image | Specifies the local path of the image displayed in the JRotator. This property has higher priority than Display Value. Data type: String
Vertical Alignment | Specifies the vertical justification of the text in the JRotator container. Choose an option from the drop-down list. Data type: Enumeration
Horizontal Alignment | Specifies the horizontal justification of the text in the JRotator container. Choose an option from the drop-down list. Data type: Enumeration