Saving and Retrieving Intermediate Report Results

In this section:

Many reports require results developed in prior reports. This technique requires that intermediate results be stored for reuse. An example is the need to compute net profit in an Income Statement prior to calculating equity in a Balance Sheet. In the Financial Report Painter, you can save selected rows from one or more models by posting them to a work file. These rows can then be recaptured by picking them up from the work file.

The default work file is FOCPOST. Note that this is the common WebFOCUS comma-delimited file format, so you can report from it directly if a FOCPOST Master File is available. Note also that you must create a FILEDEF command to allocate the file to a logical name (ddname) prior to executing the report. The Allocation Wizard enables you to perform a FILEDEF command before running the report that posts the data, and again before running the report that picks up the data. For details on Allocation operations, see the Developing Reporting Applications manual.

Note that you cannot prepare a financial report entirely from data that you enter directly in the matrix (for example, on a DATA row). However, you can prepare a report entirely from data that is stored in a comma-delimited work file.


Top of page

x
Posting Data

How to:

Reference:

You can save any TAG, RECAP, or DATA row by posting the output to a file. These rows can then be used as though they were provided in a DATA row.

The row will be processed in the usual manner in the report, depending on its other options, and then posted. The label of the row is written first, followed by the numeric values of the columns, each comma-separated, and ending with the terminator character of a dollar sign ($).

For example:

AR       , 18829,     15954,$
INV      , 27307,     23329,$


x
Procedure: How to Post Data to a Work File
  1. Select a TAG, RECAP, or DATA row in the Design matrix.
  2. Enter the ddname of the work file in the Post To input box for Row Properties, above the matrix.
  3. Right-click anywhere in the row (except on the label) and select Row Properties from the context menu. The selected Row Type dialog box opens.
  4. Click the General tab and enter a ddname in the Post To input box under Formatting Options.

The selected row is saved in the designated work file (in comma-delimited format) from which you can then pick it up for use in another financial report.

Repeat the process for each row you wish to save to a work file (either the same file or a different one).

Note: Remember that you must create a FILEDEF command to assign a logical (ddname) to the work file before you execute the request.



x
Procedure: How to Retrieve Posted Data

You can retrieve posted rows from a work file and use those rows as if they were provided in a TAG row.

Remember that you must create a FILEDEF command to assign a logical (ddname) to the work file before you execute the request.

From the matrix in which you want to pick up data:

  1. Select the row that will contain the picked up data. (If necessary, add or insert a blank row (see Formatting Financial Reports).
  2. Click the Pickup icon on the toolbar.

    or

    Right-click anywhere in the row (except on the label) and select Pickup from the context menu. The PICKUP dialog box opens at the General tab.

  3. Enter a title for the PICKUP row in the Title box. This title will appear in the report.
  4. To supply an explicit row label to replace the default label on the matrix, type it into the Label box. (The default label is retained internally.)
  5. In the Pickup From box, enter the ddname for the work file that contains the posted data, followed by a space and the label of the data row you want to pick up.
  6. To suppress the display of the PICKUP row, select the Invisible check box.
  7. Click OK.

PICKUP appears in the Row Type column on the matrix, along with the label and title you have defined and the data values retrieved from the designated work file.

Repeat this process to include additional PICKUP rows in the report.



x
Reference: PICKUP Dialog Box

Pickup Dialog box

General Tab

Title

Specifies a title for the picked up data. This title will appear on the report.

Label

Lists the default label for the PICKUP row. You can replace the default row identification label with an explicit row label that you want to reference in an expression.

Formatting Options:

The following options apply to individual rows in the report.

Invisible

Picks up data for use in a RECAP calculation, but does not display the retrieved data.

Pickup From

Is the ddname of the work file that contains the data you wish to retrieve, followed by a space and the label of the PICKUP row.



x
Reference: Design Matrix With Pickup Rows

In the following matrix, two rows are designated as PICKUP.

Design matrix

Notice that the labels for these rows are referenced in the RECAP formula.

You can see the underlying source code, including the name of the work file to which the rows of data were posted, in the following screen.


WebFOCUS