Sybase 2 Barcode Reader User Manual


 
CHAPTER 12 Working with Crosstabs
DataWindow Designer User’s Guide 335
The first-quarter sales of Cosmic printers displays in the first data cell. (As you
can see from the data in the
Printer table shown before the crosstab, in Q1
Simpson sold 33 units, Jones sold 5 units, and Perez sold 26 units—totaling 64
units.) DataWindow Designer calculates each of the other data cells the same
way.
To create this crosstab, you only have to tell DataWindow Designer which
database columns contain the raw data for the crosstab, and DataWindow
Designer does all the data summarization automatically.
What crosstabs do
Crosstabs perform two-dimensional analysis:
The first dimension is displayed as columns across the crosstab.
In the preceding crosstab, the first dimension is the quarter, whose values
are in the Quarter column in the database table.
The second dimension is displayed as rows down the crosstab.
In the preceding crosstab, the second dimension is the type of printer,
whose values are in the Product column in the database table.
Each cell in a crosstab is the intersection of a column (the first dimension) and
a row (the second dimension). The numbers that appear in the cells are
calculations based on both dimensions. In the preceding crosstab, it is the sum
of unit sales for the quarter in the corresponding column and printer in the
corresponding row.
Crosstabs also include summary statistics. The preceding crosstab totals the
sales for each quarter in the last row and the total sales for each printer in the
last column.
How crosstabs are
implemented in
DataWindow Designer
Crosstabs in DataWindow Designer are implemented as grid DataWindow
objects. Because crosstabs are grid DataWindow objects, users can resize and
reorder columns at runtime (if you let them).
Import methods return empty result
A crosstab report takes the original result set that was retrieved from the
database, sorts it, summarizes it, and generates a new summary result set to fit
the design of the crosstab. The
ImportFile, ImportClipboard, and ImportString
methods can handle only the original result set, and they return an empty result
when used with a crosstab report.