RAD Studio
ContentsIndex
PreviousUpNext
Building a VCL Forms Application with Decision Support Components

Creating a form with tables and graphs of multidimensional data consists of the following major steps:

  1. Create a VCL form.
  2. Add a decision query and dataset.
  3. Add a decision cube.
  4. Add a decision source.
  5. Optionally add a decision pivot.
  6. Add one or more decision grids and graphs.
  7. Set the active property of the decision query (or alternate dataset component) to True.

To create a VCL form

  1. Choose FileNewOtherDelphi Projects and double-click the VCL Forms Application icon. The VCL Forms Designer displays.
  2. If necessary, click Form1 to make it the active window.

To add a decision dataset

  1. From the Decision Cube page on the Tool Palette, add a DecisionQuery component to the top of the form.
    Tip: Place non-visual components such as this one in the top left corner of the form to keep them out of the way of visual components you will be adding.
  2. Right-click the DecisionQuery component, and select Decision Query Editor.... The Decision Query Editor displays.
  3. On the Dimensions/Summary tab, select the BCDEMOS database from the Database: drop-down list.
  4. From the Table: drop-down, select the parts.db table. The List of Available Fields: listbox displays the fields in the parts.db table.
  5. Use CTRL+Click to select the PartNo, OnOrder, and Cost fields; then click the right-arrow button next to the Dimensions: listbox. PartNo, OnOrder, and Cost display in the listbox.
  6. Select the OnOrder field; then click the right-arrow button next to the Summaries: listbox and select count from the pop-up that displays. COUNT(OnOrder) displays in the Summaries: listbox.
  7. Select the Cost field in the List of Available Fields: listbox; then click the right-arrow button next to the Summaries: listbox and select sum from the pop-up that displays. SUM(Cost) displays in the Summaries: listbox.
  8. Click OK to close the Decision Query Editor.
Note: When you use the Decision Query Editor, the query is initially handled in ANSI-92 SQL syntax and then translated (if necessary) into the dialect used by the server. The Decision Query editor reads and displays only ANSI standard SQL. The dialect translation is automatically assigned to the TDecisionQuery's SQL property. To modify a query, edit the ANSI-92 version in the Decision Query rather than the SQL property.

To add a decision cube

  1. From the Decision Cube page on the Tool Palette, add a decision cube component to the top left corner of the form.
  2. In the Object Inspector, select DecisionQuery1 from the drop-down list next to the decision cube's DataSet property.

To add a decision source

  1. From the Decision Cube page on the Tool Palette, add a decision source component to the top left corner of the form.
  2. In the Object Inspector, select DecisionCube1 from the drop-down list next to the decision source's DecisionCube property.

To add a decision pivot

  1. From the Decision Cube page on the Tool Palette, add an optional DecisionPivot component to the top of the form.
    Tip: The decision pivot displays in the final application window. Place it to the right of the nonvisual components.
  2. In the Object Inspector, select DecisionSource1 from the drop-down list next to the decision pivot's DecisionSource property.

To create a decision grid

  1. From the Decision Cube page on the Tool Palette, add a decision grid component to the form just beneath the decision pivot.
  2. In the Object Inspector, select DecisionSource1 from the drop-down list next to the decision grid's DecisionSource property.

To create a decision graph

  1. From the Decision Cube page on the Tool Palette, add a decision graph component to the form just beneath the decision grid.
  2. In the Object Inspector, select DecisionSource1 from the drop-down list next to the decision graph's DecisionSource property.

To run the application

  1. In the Object Inspector, select True from the Active property drop-down. The visual decision graph, grid, and pivot components display data.
  2. Choose RunRun to run the application. The application runs and displays the decision support components.
  3. Use the decision pivot to update, as desired, the data displayed in the grid and graph.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!