Sybase 2 Barcode Reader User Manual


 
CHAPTER 7 Working with Controls in DataWindow Objects
DataWindow Designer User’s Guide 205
To compute a picture name at runtime, use the
Bitmap function in the
expression defining a computed field. If you change the bitmap in the Picture
control in a DataWindow object, you need to reset the original size property.
The property automatically reverts to the default setting when you change the
bitmap.
To use a picture to indicate that a row has focus at runtime, use the
SetRowFocusIndicator function.
Adding computed fields to a DataWindow object
You can use computed fields in any band of the DataWindow object. Typical
uses with examples include:
Calculations based on column data that change for each retrieved row
If you retrieve yearly salary, you can define a computed field in the detail
band that displays monthly salary:
Salary / 12.
Summary statistics of the data
In a grouped DataWindow object, you can use a computed field to
calculate the totals of a column, such as
salary, for each group: sum
(salary for group 1)
.
Concatenated fields
If you retrieve first name and last name, you can define a computed field
that concatenates the values so they appear with only one space between
them:
Fname + " " + Lname.
System information
You can place the current date and time in a DataWindow object's header
using the built-in functions
Today() and Now() in computed fields.
Computed columns versus computed fields
When creating a DataWindow object, you can define computed columns and
computed fields as follows:
In the Select painter, you can define computed columns when you are
defining the
SELECT statement that will be used to retrieve data into the
DataWindow object.