Introduction to PowerBuilder

HomePrevious Lesson: Crosstab Presentation Style
Next Lesson: Composite Presentation Style

Graph Presentation Style

PowerBuilder allows you to retrieve data and display it as a Graph, with/without the data appearing along with the graph in the DataWindow. Whilst the graph engine might not be as powerful as those bundled up with some spreadsheet packages, it should be able to produce enough varieties to cater to most business needs.

  1. Select File > New menu option and click on DataWindow tab page.
  2. Select N-Up presentation style.
  3. Select SQL SELECT data source.
  4. Select trans table and click Open button.
  5. Select columns from trans table as shown below.
  6. SELECT "trans"."tran_date", 
           "trans"."tran_type", 
           "trans"."tran_item_no", 
           "trans"."tran_qty"
    

    FROM "trans" WHERE ("trans"."tran_type" = 'R') AND ("trans"."tran_item_no" = 1)

  7. Select 'File > Return to DataWindow Painter' menu option.
  8. Select tran_date for Category prompt and SUM(tran_qty for graph) for the Values prompt and click Next button.
  9. Specify graph heading as shown in the picture and select '3D Column' graph type.

The preview shows the report as shown in the following picture. In fact, PowerBuilder supports a bunch of other graph types, select them from General tab page in the properties sheet. For detailed information on all those options, please refer to the Graph Control in the Window painter session.

HomePrevious Lesson: Crosstab Presentation Style
Next Lesson: Composite Presentation Style