Introduction to PowerBuilder

HomePrevious Lesson: Graph Presentation Style
Next Lesson: Nested Reports

Composite Presentation Style

A Composite presentation style allows you to design a DataWindow using multiple existing DataWindows. Till PowerBuilder version 4.0, it was difficult to print two DataWindows side-by-side. This presentation style is a solution for that problem. Let's create a DataWindow to display

Actually this can be done with a SQL join and a single DataWindow, however the presentation becomes a problem.

  1. To overcome that, create a FreeForm presentation style DataWindow for product_master. Select all columns for product_no 1 (source is shown below). Save this DataWindow as d_product_master_test.
  2. SELECT "product_master"."product_no",  
             "product_master"."product_description",   
             "product_master"."product_balance",   
             "product_master"."product_reorder_level",   
             "product_master"."product_measuring_unit"  
        FROM "product_master"  
       WHERE "product_master"."product_no" = 1
  3. Create a tabular DataWindow using trans table, select all columns from the table for tran_item_no 1 (source is shown below). Save this DataWindow as d_trans_test.
  4. SELECT "trans"."tran_no",   
             "trans"."tran_date",   
             "trans"."tran_type",   
             "trans"."tran_serial_no",   
             "trans"."tran_item_no",   
             "trans"."tran_qty"  
        FROM "trans"  
       WHERE "trans"."tran_item_no" = 1
  5. Select File > New menu option and click on DataWindow tab page.
  6. Select Composite presentation style.
  7. Select product_master table and click Open button.
  8. Select d_product_master_test and d_trans_test from the DataWindows list.

HomePrevious Lesson: Graph Presentation Style
Next Lesson: Nested Reports