IsSelected

Description

Determines whether the row is selected. A selected row is highlighted using reverse video.

Syntax

IsSelected ( )

Returns

Boolean. Returns true if the row is selected and false if it is not selected.

Usage

When you use IsSelected in bands other than the detail band, it reports on a row in the detail band. See GetRow for a table specifying which row is associated with each band for reporting purposes.

Examples

Example 1

This expression for a computed field in the detail area displays a bitmap if the row is selected:

Bitmap(If(IsSelected(), "beach.bmp", ""))

Example 2

This example allows the report to display a salary total for all the selected rows. The expression for a computed field in the detail band returns the salary only when the row is selected so that another computed field in the summary band can add up all the selected salaries.

The expression for cf_selected_salary (the computed field in the detail band) is:

If(IsSelected(), salary, 0)

Example 3

The expression for the computed field in the summary band is:

Sum(cf_selected_salary for all)

See also