Creating a Compound Layout Report

In this section:

How to:

Reference:

There are multiple types of compound reports that can be built in Document Composer:

A compound layout report is comprised of individual component reports or graphs, either embedded or external. Reports and graphs can be positioned anywhere on the page. When you create a report or open Document Composer, the Properties window shows the compound document properties for the compound layout report.

You can create pre-process code that applies to all objects added to a document. For example, if a report or graph within your document requires the joining of two tables, you can create pre-process code that joins those two tables. This join can then be used by any object in the document and any items following the pre-process code.

In addition, you can create post-process code that runs after the document is run. This can be used in conjunction with pre-process code. For example, using pre-process code, you could create a join. You could then use the post-process code to clear that join.

Note: Pre-process code and post-process code are not meant to display output.


Top of page

x
Procedure: How to Create Pre-process Code for a Document

While in a document:

  1. From the Insert menu, click Pre-process code.

    The procedure viewer window opens.

    Here, you can create the pre-process code that the document will use. A join is being used in this example.

  2. Click the component connector and select Join.
  3. Join the videotrk and movies Master Files.
  4. Save and close the Join.
  5. Close the procedure viewer.
  6. In your document, create a report frame.
  7. Double-click the report frame to open the procedure viewer.

    Note:

    • Normally, double-clicking a report frame prompts you to select a Master File for creating a report. However, when pre-process code or post-process code is present, the procedure viewer opens instead.

    • The pre-process code is displayed, with the last block being a comment that states:

      Do not move, remove, or modify. Pre-process code above.

      This comment separates pre-process code from component code. Adding component blocks before this comment, or editing what is already there, modifies the pre-process code. Adding blocks after this comment affects the component code.

  8. Click the component connector after the pre-process code and select Report.

    Report Painter opens.

    The pre-process code joined the videotrk and movies Master Files, allowing you to use data from both in your report.


Top of page

x
Procedure: How to Create Post-process Code for a Document

While in a document:

  1. From the Insert menu, click Post-process code.

    The procedure viewer window opens.

    Here, you can create the post-process code that the document will use. A join clear is being used in this example.

    Note: Any pre-process code you created is shown in the procedure viewer. Do not modify or delete the pre-process code when creating or modifying post-process code.

  2. Click the component connector after all other procedure components and select Join.
  3. Clear all joins.
  4. Save and close the Join.
  5. Close the procedure viewer.

    After the document runs, the post-process code will clear all joins. When combined with pre-processing code, you can create the joins before the document is run and clear the joins after.


Top of page

x
Procedure: How to Create a Report Frame

Whether you are using an embedded or external report, you must first create the report frame. To create the report frame:

  1. Click the Report icon.

    Your cursor becomes a crosshair.

  2. Click and drag the crosshair to create a report frame.
  3. Adjust the report frame to the size you want.

Top of page

x
Procedure: How to Add an Embedded Report

You can use Document Composer to add embedded reports by either creating a report or importing an existing procedure.


Top of page

x
Procedure: How to Add an External Report

External reports are reports that are created and saved outside of Document Composer. To reference (or add) an external report, right-click the report frame and select Reference existing procedure. An EX command will be used to execute the component procedure at run time.


Top of page

x
Layering Objects

You can layer objects that are added to the page layout by using the object context menu shown in the following image:

The options are:

When using any of these commands, the stacking order of the object will change. This is reflected in the z-index property in the Properties window, The z-index is the stacking order of a specific object.


Top of page

x
Reference: Adding External Reports

Top of page

x
Procedure: How to Create a Coordinated Compound Layout

A coordinated compound layout coordinates all reports and graphs from the document with a common sort field. The coordinated report is burst into separate page layouts at run time, where each value for the first sort field displays on a separate page.

Note: When processing a coordinated compound document with missing values, any component that does not have data corresponding to the sort value will be presented as a blank (empty) component.

  1. From the Properties window in Document Composer, select Compound document from the Properties list.
  2. Select On from the Coordinate report properties field.

    Note: Coordinate report is set to Off by default.

  3. Save and run the document.

The output is burst into separate page layouts by the common sort field.

In the example image below, the coordinated compound layout runs in PDF output with REGION as the common sort field among the report and graph within the document.


WebFOCUS