Using the Crosstab Presentation Style
\The Sandbox \PB History & Future \New in PB 3 \New DataWindow Features \Crosstab Presentation Style
Additional DW
Functions
Changing
DBs
dwDescribe &
dwModify
DW Control
Functions
Crosstab
Presentation Style
Graph
Presentation Style
Graph in a
DataWindow

The crosstab presentation style for a DataWindow uses the information you specify in the Crosstab Definition window to create a cross tabulation table. The crosstab table uses data from the database but does not change the data, it just tabulates the data, analyzes it, and displays the results.

To use the crosstab presentation style:

  1. Open the DataWindow painter and click the New button in the Select DataWindow window.
  2. Select a data source and then select Crosstab as the presentation style.
  3. Define the data source. The Crosstab Definition window displays.
  4. Enter the name of the column containing the values you want to display in the expression across the top of the crosstab report in the Columns line edit or select the column name from the list in the Columns dropdown listbox.
  5. For example, if the class column has the values Bio and Math and you specify class as the crosstab column and Sum(grades for crosstab) as the value, the default column headers will be Sum for Bio and Sum for Math.

  6. Enter the name of the column containing the values you want to display down the left side of the crosstab report in the Rows line edit or select the name from the list in the Rows dropdown listbox.
  7. For example, if you select class_day as the Rows column, the values in the class_day column will display down the left side of the crosstab.

  8. Enter the function call you want to execute to obtain the values of the crosstabs in the Values line edit or select the name from the list in the Values dropdown listbox. You can enter more than one expression. The expressions must be separated with commas.
  9. For example, if you specify class for in Columns and class_day in Rows, you may specify Count(student_id for crosstab) in Values to obtain the number of students in a class and Avg(grades for crosstab) to obtain the average grade for the class.

  10. Click the OK button. The Crosstab Definition closes and PowerBuilder builds the crosstab.

Related topics

    Defining a Style for a Crosstab

    Modifying the Crosstab Definition

PBL Peeper PB Help PB History
& Future About Us Feedback Site Map

Google
 
Web www.techno-kitten.com
www.sybase.com