Creating a TreeView report

StepsTo create a TreeView report:

  1. Select File>New from the menu bar and select the Object tab.

  2. Choose the TreeView presentation style for the report and click OK.

    The page in the New dialog box includes the TreeView icon.
  3. Select the data source you want to use.

    You are prompted to specify the data.

  4. Define the tables and columns you want to use.

    You are prompted to specify the TreeView grouping columns.

    In the following example, TreeView grouping will be by department, as specified by the dept_id column:

    Shown is the Set Report Definition dialog box. The Department ID column is in the Columns list.

    If you want to use an expression, you can define it when you have completed the wizard. See “Using an expression for a column name”.

    The sample report shown in “Example” uses the department and employee tables in the EAS Demo DB database.

  5. Specify the column or columns that will be at the top level (level 1) of the TreeView report.

    The sample report uses the department name as the top level. If you want to display both the department ID and department name, you specify that both columns are at the top level.

  6. If you want the TreeView report to display grid lines, select the Grid Style check box.

    When you select the Grid Style check box, the TreeView report displays grid lines for rows and columns. You can drag the grid lines to resize rows and columns.

  7. Click Next.

  8. Modify the default color and border settings if needed, and then click Next.

  9. Review the TreeView report characteristics.

  10. Click Finish.

The report painter Design view displays. For information about the Design view, see “TreeView report Design view”. For information about adding additional levels, see “Adding and deleting TreeView levels”.

What InfoMaker does

As a result of your specifications, InfoMaker generates a TreeView report and creates:

Here is the sample TreeView report in the Design view:

The sample shows the design view of the report with the department ID at the first tree view level and the employee’s ID, name, and salary in the Detail band.

If you selected the Grid Style check box, vertical and horizontal grid lines display:

The sample shows the same report with grid lines separating the columns.

Here is the sample TreeView report in the Preview view:

The sample shows a preview of the report with the node for Department two hundred expanded to display employee details.

Using an expression for a column name

If you want to use an expression for one or more column names in a TreeView, you can enter it as the TreeView definition on the General page in the Properties view after you finish using the TreeView wizard.

StepsTo use an expression for a TreeView column name:

  1. Open the Properties view and click the TreeView level band in the Design view.

  2. Click the ellipsis button next to the TreeView Level Definition box on the General page in the Properties view to open the Specify Group Columns dialog box.

  3. In the Columns box, double-click the column you want to use in an expression.

    The Modify Expression dialog box opens. You can specify more than one grouping item expression for a group. A break occurs whenever the value concatenated from each column/expression changes.

What you can do

All of the techniques available in a tabular report, such as moving controls and specifying display formats, are available for modifying and enhancing TreeView reports. See “Adding and deleting TreeView levels” to read more about the bands in a TreeView report and see how to add features especially suited for TreeView reports, such as additional TreeView levels or summary statistics.

NoteReport is not updatable by default When you generate a report using the TreeView presentation style, InfoMaker makes it not updatable by default. If you want to be able to update the database through the TreeView report, you must modify its update characteristics. For more information, see Chapter 19, “Controlling Updates in Forms.”