Sybase 2 Barcode Reader User Manual


 
CHAPTER 12 Working with Crosstabs
DataWindow Designer User’s Guide 339
Dynamic crosstab
example
The process is illustrated using the following dynamic crosstab. The columns
in the database are Rep, Quarter, Product, and Units. The crosstab shows the
number of printers sold by Quarter:
Specifying the
columns
You use the Columns box to specify one or more of the retrieved columns to
provide the columns in the crosstab. When users run the crosstab, there is one
column in the crosstab for each unique value of the database column(s) you
specify here.
To specify the crosstab’s columns:
Drag the database column from the Source Data box into the Columns
box.
Using the printer example, to create a crosstab where the quarters form the
columns, specify Quarter as the Columns value. Because there are four values
in the table for Quarter (Q1, Q2, Q3, and Q4), there are four columns in the
crosstab.
Specifying the rows
You use the Rows box to specify one or more of the retrieved columns to
provide the rows in the crosstab. When users run the crosstab, there is one row
in the crosstab for each unique value of the database column(s) you specify
here.
To specify the crosstab’s rows:
Drag the database column from the Source Data box into the Rows box.
Using the printer example, to create a crosstab where the printers form the
rows, specify Product as the Rows value. Because there are three products
(Cosmic, Galactic, and Stellar), at runtime there are three rows in the crosstab.