Friday, April 27, 2012

How can I tell in a DataWindow which rows are the first and last ones displayed?

Create a hidden computed column with the following expression:

IF (GetRow() = First(GetRow() FOR Page), 1, 0) // 1 = first row on page

IF (GetRow() <> 1 AND GetRow() = Last(GetRow() FOR Page), 1, 0) // 1 = last row on page


With this knowledge, you can also display the rows currently displayed:
[Footer Band]
‘Rows ‘ + String(First(GetRow() FOR Page)) + ‘ to ‘ + String(Last(GetRow() FOR Page)) + ‘ are displayed’

No comments:

Post a Comment