Skip to main content
Previous sectionNext section

Editing the Report Content

The Data Collection Builder provides a graphical editor that lets you modify the content and structure of the data retrieved from the Caché database and included in the report. The following section provides a brief introductory tutorial. The subsequent section describes the main elements of the Data Collection Builder user interface.

Tutorial

In the following exercise, you begin to build a report similar to ZENApp.MyReport provided in SAMPLES namespace.

  1. Click DeepSee, Visual Reporting, Report Data Definition, and then Data Collection Builder.

  2. Click New. The system displays a dialog box where you can enter the following values:

    • Package Name — MyApp

    • Class Name — MyReportDC

  3. Click OK.

  4. At the top of the Data Source column, click Change, and in the dialog box, select ZENApp.Report.Invoice.

    Click Save.

    If you go on from this point to define a data presentation and run the report, as you did in the previous tutorial, the result is a report containing all the data you see in ZENApp.MyReport, but without grouping, sorting or aggregation. Instead, follow the next steps to change the organization of the report.

  5. Note that by default, all the data fields in the report are in a group with the field name queryResult. Click the Group button at the top of the Data Fields column. A new line appears in the report with the field name Group. Note that the new group is flagged as having a problem, because it has no content.

    Drag all fields except SalesRep from the group queryResult to the new group.

  6. Select the field queryResult and perform the following edits in the Properties column:

    1. Change Field Name from queryResult to SalesRep.

    2. Click the down arrow to the right of the Break On field, and select SalesRep from the list.

  7. Select the field Group and perform the following edits in the Properties column:

    1. Change Field Name from Group to Record.

    2. Click the down arrow to the right of the Secondary Sort By field, and select SaleDate from the list.

    3. Click Save.

From this point, you can go on to define the data presentation and preview or run the report as described in the steps “Building the Data Presenter” and “ Running the Report” in the section “DeepSee Visual Reporting Overview.”

Data Collection Builder UI

The Data Collection Builder offers several views of the data definition. The available views are as follows:

  • generated description: data definition lets you edit the report data definition

  • generated description: class properties lets you edit report properties

  • generated description: data group filters lets you edit data group filters

  • generated description: methods lets you edit supplemental methods

Report Data Definition

The report data definition view organizes the page into three columns:

  • Data Source – Shows the class that is providing the data and lists the data fields available from that source.

  • Data Fields – Shows the data fields currently in the report, and any grouping, sorting, and aggregation you have added.

  • Properties – Lets you edit properties of the report component selected in the Data Fields column.

Data Source Column

The Data Source column is empty until you have used the Change button to select the class that provides data for the report. Once you have selected a data source, the column lists the class you selected, and the data fields available in that class.

Data Fields Column

The Data Fields column lists the items and groups currently in use in the report. By default, the report includes items for the time when the report was generated, and the person who generated it. You can delete entries by clicking on the red X at the far right of the column. You can add entries by dragging and dropping data fields from the Data Source column, or by clicking the Item or Group buttons at the top of the column. Item and group names must be unique.

Items

Items provide the data that appears in the report. Each entry shows the field name, and the derivation, or source expression, that provides that data. You can add database-derived items by dragging data fields from the Data Source column. You may want to drag the same data field into the report more than once, for example to provide data for aggregation. You can add items that are not derived from the database by clicking the Item button at the top of the column.

Groups

Groups let you organize the items in your report. Click the Group button to add a group. When you first add a group, it is flagged with an error indicator. You can click on the red exclamation point icon to see the error message, which tells you that the group has no defined contents. Adding items to the group resolves the error condition.

Properties Column

The Properties column lets you edit properties of the items and groups listed in the Data Fields column. When you select an entry in the Data Fields column, appropriate fields and values appear in the Properties column.

For items supplied by fields from the database, you can edit the Field Name, but not the Source Expression. For items not derived from the database, you can edit the Source Expression as well. Database-derived fields also provide a field to select an aggregation.

Groups allow you to edit the Field Name, which is the name of the group. You can also specify a field to use for sorting and grouping records in the report. When you generate the report, records are sorted by the “Break On” field, and output in groups where the value of the field is the same.

Report Properties

The Report Properties view lets you add properties to the report. Click the Add button to add a new property. You can then edit the following information about the property:

  • Property – The name of the property. The default value provided is RptProp.

  • Type – The datatype of the property. The default value provided is %String.

  • URL Token – The name used to provide a value for this property in the URI string supplied to the browser to invoke the report.

  • Default – The default value for this property.

  • Constraint – Constraints on the value of this property, such as maximum and minimum values.

  • Description – A brief description of the property.

Data Group Filters

When you use the Change button in the Data Source column of the Report Data Definition view DeepSee Visual Reporting creates an SQL statement that selects all available data records for the report. The Data Group Filters view lets you supply an SQL WHERE clause that limits the data returned to the report.

Supplemental Methods

The Supplemental Methods view lets you add methods to the report. Click the Add button to add a new method. The screen provides fields and controls to edit the following information about the method:

  • Name: – The name of the method.

  • Returns: – Data type of the value returned by the method. The default is %String.

  • Language: – The language used to write the method. The default is ObjectScript. You can write other values in the field.

  • Arguments: – Define arguments for the method. A + button at the right end of the form lets you add a new argument. Click on the red X at the far right of the form to delete an argument.

  • Implementation: – Use this field to edit the body of the method.