GetRow

Description

Reports the number of a row associated with a band in a DataWindow object.

Syntax

GetRow ( )

Returns

Long. Returns the number of a row if it succeeds, 0 if no data has been retrieved or added, and -1 if an error occurs. Where you call GetRow determines what row it returns, as follows:

If the control in the DataWindow object is in this band

GetRow returns

Header

First row on the page

Group header

First row in the group

Detail

The row in which the expression occurs

Group trailer

Last row in the group

Summary

Last row in the DataWindow object

Footer

Last row on the page

Examples

Example 1

This expression for a computed field in the detail band displays the number of each row:

GetRow()

Example 2

This expression for a computed field in the header band checks to see if there is data. It returns the number of the first row on the page if there is data, and otherwise returns No Data:

If(GetRow()= 0, "No Data", String(GetRow()))

See also