Tutorial 30 - Creating a Branch Income Statement

During this exercise, you will create a Branch Income Statement Report consisting of several Print Templates and Report Procedures. They will be practically identical to the Consolidated Income Statement with the exception that you will want to be able to print this report for the East Side Branch or the West Side Branch or both. To make things easier when specifying your Parameter selections during run-time, you will set up a Value List to serve as a pop-up list selector.

Exercise 30 - 1, Adding a Value List
Launch the Value List editor and add a new list Operating Branches with the List items: All, East Side, West Side. When saved, the Value List Editor should look like this:

Exercise 30 - 2, Creating One Print Template
In this Tutorial you will be utilizing most of the Print Templates which you originally created for the Consolidated Income Statement (Tutorial 29). You will also use the same Page Layout and the Grid Inspector as for the Balance Sheet (Tutorial 28) and the Consolidated Income Statement (Tutorial 29). However, you need a different Header Template because the Branch Statements should identify the Branch Name. One way of doing this is to add a Subtitle dynamic field:

1. Launch the Print Template editor.
2. Select the PLCHeader Template.
3. Save As PLBHeader.
4. Select all fields excluding the two top Title fields and drag down one row.
5. Modify the second Title line "Consolidated Income Statement" by removing "Consolidated."
6. Delete the Report Date field and rename the Date Text field to Date Line; reposition the Date Line field, and set the Alignment to |-><-|.
This is in preparation to introducing you to the DateToText Function which allows the concatenation of the Date (e.g. December 31, 1998) with its textual explanation (For The Year Ended). This feature guarantees that the Date Line is always perfectly positioned below the other Header information, regardless as to the number of characters and digits contained in the text component or the date.

7. Drag a Print field from the Palette, position it below the Title "Income Statement," and rename the generic name dyn1 to Subtitle (in the Palette).
The completed Template should now look like this. Save it and Quit the Print Template editor.

Exercise 30 - 3, Creating Four Report Procedures
Three of these Procedures deal with different features of the Income Statement:
ISBRevTotal = sums up the total Revenue for the Current Period and Year To Date as the Percentage basis.
ISBDetail = handles section headers, individual print lines, and section subtotals.
ISBranch = uses the ISBDetail and ISNet (created in Tutorial 29) as encapsulated Procedures.
The fourth Procedure, IncomeStatementBran, is the only one marked as Selectable as a Report in the Inspector's Legend view. It uses the ISBRevTotal and ISBranch Procedures as Functions. The IncomeStatementBran determines the Branch reports to be printed based upon its own Input Parameters and calculates all additional Parameters needed by the various encapsulated Procedures which produce the actual Branch Income Statement(s).

As part of this exercise, you will create the four Report Procedures by selecting some of the Procedures used for the Consolidated Income Statement and copying them using the Save As... menu item. You will then modify the new Procedure according to the examples shown and any additional instructions, where applicable.

Do this:
Copy the ISRevTotal (Save As... ISBRevTotal).
Eliminate the retrievals from the AcctName table and instead instruct the Functions used to obtain:
the GL Account information from the Account List REV (you have to click on the Run-time button to make the field editable) and
the GL Prefix from the new input Parameter Prefix.

Do this:
Copy the ISDetail (Save As... ISBDetail).
Add a new Parameter Input (Prefix) and instruct the Functions used to obtain the GL Prefix from the Prefix Parameter.

Do this:
Copy the IncomeStatementCons (Save As... ISBranch). As you modify the ISBranch Procedure, you will have to reposition a number of objects to fit the modifications including the Condition objects which check for zero value of the Amount fields C$ and Y$ for retrieved GL Accounts.

Remove the following Functions: CurrentSystemState, DateToPeriod, and AccountingPeriod. Split the Calculation box (which is priming 12 variables) into two groups of 6 each in order to fit them better into the Workspace. Replace the Print object PLCHeader with PLBHeader.

Next, expand the Parameter object as per example. Caution: RC$ and RY$ are already defined as Variables (temporarily rename them as TC$ and TY$ in the Palette - because you can't have Parameters and Variables with the same name). This last step will also have renamed those variables in the Procedure e.g. in Calculations. After completing the Parameters, replace all occurrences of TC$ and TY$ with RC$ and RY$ (you can do that either by typing the corrections or selecting the old text and clicking on the new Parameter in the Palette.

Set the Select as a Report switch to No.

Do this:
Copy the IncomeStatementCons (Save As... IncomeStatementBran). Remove most of the objects, leaving the Functions: CurrentSystemState, DateToPeriod, and AccountingPeriod.

Expand the Parameter by adding Branch. With the Parameter object still selected, designate the newest Parameter to be a pop-up list: select Branch in the Parameters Inspector, then select Operating Branches from the User-defined section of the Attached list area.

Note also the use of the DateToText Function and concatenation of the Date Text and the Header Date as the Date Line.

Complete as per example.

You are now ready to test this Procedure and, based on the Opening Journal Entry entered as part of Tutorial 27, the East Side Branch Report should look like this:

Go To
  Tutorial 31 - Creating a Process to calculate Average Cost