Eclipse BIRT Report Object Model (ROM)

Action Structure

# Structure Overview

Defines a hyperlink.

### Details

Display Name: | Action
Since: | 1.0

### Property Summary

formatType
  Format of the target link.
linkType
  The kind of link: hyperlink, bookmark link or drill-though.
paramBindings
  Optional list of parameter bindings for the target. Used when the hyperlink is used to run a report.
reportName
  Name of the target report for a drill-through link.
search
  An optional set of search criteria for the target report for a drill-though link.
targetBookmark
  Target bookmark defined within this same report, or another report for a drill-though link.
targetBookmarkType
targetFileType
targetWindow
  The name of the target browser window for the link.
toolTip
uri
  Expression that provides the web URL.

### Description

The Action structure defines a hyperlink. There are five major kinds of actions:

- Hyperlink: To an external web site, e-mail system, etc.
- Bookmark Link: To a location within this report as specified by a bookmark.
- Drill-though: To a location within another report as specified by a bookmark.

The drill-though link can link to an existing report, or request to run a new report. It can optionally include:

- Parameters to pass when creating a new report.
- A location within the target report as specified by a search.
- A location within the target report as specified by a bookmark.

The Hyperlink property returns a standard web-style link with "http:" or "mailto:" prefix. Expression hyperlinks can include special BIRT features (search and so on), but only as encoded into a URL. If the link wants to jump to a specific target within the document, encode that target within the URL as defined by target document type. (For example: http://foo.com/docs/myDoc.html#myTarget.)

If the user provides a relative URL, it is assumed to be relative to the same web server that is being used to view the report. The exact semantics are implementation-specific in the open source release. In the commercial release, the URL is relative to the web server that hosts ActivePortal.

A bookmark link simply identifies a bookmark identified within this report. Use the Bookmark property of a report item to create the target bookmark.

#### Property Usage

Property | Link Type
--- | ---
| Hyperlink | Bookmark Link | Drill-through
`targetWindow` | X |  | X
`hyperlink` | X |  |
`bookmarkLink` |  | X |
`drillThroughBookmarkLink` |  |  | X
`reportName` |  |  | X
`drillThroughParamBindings` |  |  | X
`drillThroughSearch` |  |  | X

# Property Detail

## formatType Property

Format of the target link.

### Details

Type: | string
Since: | 2.0
Required: | No
Display Name: | Format Type
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Choices

Name | Display Name | Value | Description
html | html | html |
pdf | pdf | pdf |

### Description

Format of the target link, can be pdf or html link.

## linkType Property

The kind of link: hyperlink, bookmark link or drill-though.

### Details

Type: | choice (actionLinkType)
Since: | 1.0
Required: | No
Display Name: | Link type
JavaScript Type: |
Default Value: | hyperlink
Runtime Settable: | Yes

### Choices

Name | Display Name | Value | Description
none | No Action Link Type | none | No link is defined.
hyperlink | HyperLink | hyperlink | A link to a web page, "mailto:", or other web resource.
drill-through | Drill Through | drill-through | A link to another report.
bookmark-link | Bookmark Link | bookmark-link |

### Description

This property identifies the kind of link. The link type determines which link properties to use as shown above. The default is a hyperlink.

A drill-through is a link to another report. The report name is given as a relative or absolute name. If the name is relative, then the target document is on the same web (application) server as the current report. For example:

- report1: in the same virtual directory as this report.
- ../report2: Up one virtual directory from this report.
- ../summary/report3: In a sibling directory to this report.
- /reports/summary/report4: In an absolute location on this web server.

The destination can be any type of report as supported by the web server interface that receives the link commands. If the destination is a BIRT design, the report will be run.

## paramBindings Property

Optional list of parameter bindings for the target. Used when the hyperlink is used to run a report.

### Details

Type: | List of ParamBinding Structures
Since: | reserved
Required: | No
Display Name: | Parameter Bindings
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Description

Optional list of parameter bindings for the target. Used when the hyperlink is used to run a report. The bindings evaluate an expression within the current report, and bind that value to a report parameter in the target report. For example, if the current report is a list of customers, the report can include a hyperlink that runs a report that shows any open orders for that customer. In this case, the parameter bindings pass the customer ID to the target report.

## reportName Property

Name of the target report for a drill-through link.

### Details

Type: | string
Since: | reserved
Required: | No
Display Name: | Report Name
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Description

The name of a document on the same server as this report. Can include relative or absolute names. If the suffix is omitted, it is assumed to be 1) a BIRT document or 2) a BIRT design. If the report name is blank, then the no hyperlink is defined even if the link type is set to Drill-though.

## search Property

An optional set of search criteria for the target report for a drill-though link.

### Details

Type: | List of SearchKey Structures
Since: | reserved
Required: | No
Display Name: | Search Keys
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Description

Optional list of search criteria. The report is run (if needed) or an existing report is opened. Then, BIRT performs a search on the target report based on the search criteria entered here.

For example, if the current report is a list of customers, the report can include a hyperlink that links to a report that shows open orders for all customer, then search for the customer’s orders. In this case, the search criteria look for the customer’s ID within the target report.

## targetBookmark Property

Target bookmark defined within this same report, or another report for a drill-though link.

### Details

Type: | expression
Context: |
Expression Type: | string
Since: | reserved
Required: | No
Display Name: | Bookmark link
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Description

The target bookmark within this report.

If the link type is bookmark link then the value here must match a bookmark defined within the report. If the bookmark target is not defined, then the link will do nothing.

If link type is drill-though link then the value here must match a bookmark defined within the target report. If the bookmark target is not defined, then the drill-though link will display the first page of the report.

### See Also

Report Item `bookmark` Property

## targetBookmarkType Property

### Details

Type: | choice (actionBookmarkType)
Since: | 2.1
Required: | No
Display Name: | Target Bookmark Type
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Choices

Name | Display Name | Value | Description
bookmark | Bookmark | bookmark |
toc | Table of Content | toc |

## targetFileType Property

### Details

Type: | choice (actionTargetFileType)
Since: | 2.1
Required: | No
Display Name: | Target File Type
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Choices

Name | Display Name | Value | Description
report-design | Report Design | report-design |
report-document | Report Document | report-document |

## targetWindow Property

The name of the target browser window for the link.

### Details

Type: | string
Since: | 1.0
Required: | No
Display Name: | Target
JavaScript Type: |
Default Value: | _blank
Runtime Settable: | Yes

### Choices

Name | Display Name | Value | Description
_blank | Blank | _blank |
_self | Self | _self |
_parent | Parent | _parent |
_top | Top | _top |

### Description

The name of the target browser window for the link. Used only for the Hyperlink and Drill-Through options, ignored for the Bookmark Link option. This property is optional.

## toolTip Property

### Details

Type: | string
Since: | 3.2
Required: | No
Display Name: | Tool Tip
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

## uri Property

Expression that provides the web URL.

### Details

Type: | expression
Context: |
Expression Type: | string
Since: | 1.0
Required: | No
Display Name: | Location
JavaScript Type: |
Default Value: | None
Runtime Settable: | Yes

### Description

The expression that provides the actual link. This is a Web-style hyperlink and includes http:, mailto: and other URLs. Both relative and absolute URLs are allowed. The meaning of relative URL depends on the deployment environment.

If the property is not set, then no link is defined, even if the link type is set to "Hyperlink."