Adding or Removing Report Sections

An AcuBench-generated report can contain the following sections:

A report header is printed one time, at the very beginning of a report. It might contain information like the title of the report, the name of the person printing the report, and the date the report is being printed.

A report footer is printed at the very end of a report. It might include information like the time the report was completed, or a “completion” message to indicate that all necessary pages were printed.

A page header and page footer appear at the top and bottom of each page of the report. If you expect that the report you create will be printed to a device, having a page header and page footer can help to ensure the existence of proper page breaks. For this reason, even if you do not include any information in the page header or footer, it can still be useful to create the sections.

A group is a method of dividing up the data in your report according to breakpoints. You may want to preface a portion of your report with information about the items that follow, and/or conclude a portion of the report with summary or total information.

For example, if you are printing a daily report to summarize the transactions performed by five cashiers, the cashier ID might be a breakpoint. You could list the cashier ID first (group header), then, after listing the transactions, tally the daily total (group footer).

The detail section is the main body of your report. In a very simple report, you might read a record in a data file, print the record, then read the next record and repeat the process. In AcuBench terms, each of those printed records corresponds to a detail line.

In fact, a single detail line may include more than one physical row of output. You might have very long records, or construct a print line with data from multiple sources, or simply need a more readable layout that splits data items over multiple physical rows on the page. A detail section can contain as many physical rows as you need to print all of the data in the print line.

You also have the option to create multiple detail sections. When you have multiple detail sections, all of them correspond to one print line (or WRITE statement). In most cases, you can achieve the output results that you want with a single detail section. But the option to break the detail information for your report into different detail sections provides flexible shading options for readability and the option to set individual print conditions and before and after paragraphs for different segments of the same print line.

You can add or remove report sections with the Section Controller as follows:

  1. Right-click the report form in the Report Composer design window and click Section Controller. The Section Controller interface is displayed.

    BKBEBEWRPT02-low.gif

  2. Use the Header & Footer area to determine which header and footer sections, if any, will be included in your report. To add a section, check the check box to the left of the section name.

    If you are adding a page header and page footer to help regulate page breaks, make sure that the Count Height check box to the right of the section name is also checked (with a red check mark). This prompts AcuBench to generate code to keep track of page height when positioning items on the page.

  3. If you want to add additional detail sections to your report, use the Detail Section area of the Section Controller. (A report must have at least one detail section.)

    Click the New button (the third of the five buttons above the Detail Section list) to add a new detail section. Use the arrow keys to change the order of sections in the report. Use the Delete and Delete All buttons to remove sections.

    Remember that no matter how many detail sections you have, all of them correspond to one print line (WRITE statement), as described previously in this section.

  4. To add breakpoints to your report, use the Group Section area of the Section Controller. To define a group, you must specify the field or records on which the report will break, then specify whether the report should include a group header (marking the start of the group), a group footer (marking the end of the group), or both. You cannot create a group section (set a breakpoint) without displaying either a group header or group footer.

    You can specify more than one group (breakpoint) in your report. If you have multiple groups, they are nested in the order that they appear in the Section Controller interface. So if you have created group headers and footers for two group items, for example, you will see the header for the first group, followed by the header for the second group, followed by the detail section. When all of the necessary detail lines have printed, you'll see the group footer for the second group, followed by the group footer for the first group.

    • Use the Type column to specify whether the report will break on a field or on records.
    • Use the Grouped By column to specify the field or records on which the report will break.

      If the report will break on a field, clicking the browse (...) button in the Grouped By field opens a list of the data items defined in your DLTs, graphical Working-Storage, and definition files. If the report will break on records, clicking this button opens the Expression Builder.

    • Use the Show What column to specify whether you want a group header, a group footer, or both.
    • Use the Count Height column to cause AcuBench to generate additional positioning code to control where group headers and/or footers are printed in relation to their corresponding detail section(s).
  5. When you are finished making changes, click OK. The report form is updated to include the sections that you have specified.

    To abandon your changes without updating your report, click Cancel.