Sybase 2 Barcode Reader User Manual


 
Adding controls to a DataWindow object
208 DataWindow .NET
DataWindow expressions
You are entering a DataWindow expression, not a SQL expression processed
by the DBMS, so the expression follows the rules for DataWindow
expressions.
Referring to next and
previous rows
You can refer to other rows in a computed field. This is particularly useful in
n-up DataWindow objects when you want to refer to another row in the detail
band. Use this syntax:
ColumnName[x]
where x is an integer. 0 refers to the current row (or first row in the detail band),
1 refers to the next row, –1 refers to the previous row, and so on.
Examples
Table 7-1 shows some examples of computed fields.
Table 7-1: Computed field examples
For complete information about the functions you can use in computed fields
in the DataWindow painter, see the DataWindow Object Reference in the
online Help.
Menu options and
PainterBar buttons for
common functions
DataWindow Designer provides a quick way to create computed fields that
summarize values in the detail band, display the current date, or show the
current page number.
To display Enter this expression In this band
Current date at top of each page
Today() Header
Current time at top of each page
Now() Header
Current page at bottom of each page
Page() Footer
Total page count at bottom of each
page
PageCount() Footer
Concatenation of Fname and Lname
columns for each row
Fname + " " + Lname Detail
Monthly salary if Salary column
contains annual salary
Salary / 12 Detail
Four asterisks if the value of the
Salary column is greater than $50,000
IF(Salary> 50000,
"****", "")
Detail
Average salary of all retrieved rows Avg(Salary) Summary
Count of retrieved rows, assuming
each row contains a value for
EmpID
Count(EmpID)
Summary