Sample 6: Formatting Different Combinations of Data

This report uses the same layout and member selection as Sample 5, and adds more formatting in the report body. Note the use of line formatting.

                                Budget Audio New_York

                         Qtr1     Qtr2     Qtr3     Qtr4     Year   
                     ======== ======== ======== ======== ========   

Sales                   6,400    6,400    6,700    8,350   27,850   
Cost_of_Goods_Sold      3,012    3,012    3,146    3,973   13,143   
                     -------- -------- -------- -------- --------   
  Margin                3,388    3,388    3,554    4,377   14,707   

Marketing                 525      515      475      555    2,070   
Payroll                 1,950    1,950    1,950    1,950    7,800   
Miscellaneous               0        0        0        0        0   
                     -------- -------- -------- -------- --------   
  Total_Expenses        2,475    2,465    2,425    2,505    9,870   

    Profit                913      923    1,129    1,872    4,837   
                     ======== ======== ======== ======== ========   
    Profit_%            14.27    14.42    16.85    22.42    17.37   
    Margin_%            52.94    52.94    53.04    52.42    52.81
 
                               Budget Audio Boston

                         Qtr1     Qtr2     Qtr3     Qtr4     Year
                     ======== ======== ======== ======== ========   

Sales                   6,050    5,750    5,900    7,350   25,050   
Cost_of_Goods_Sold      2,829    2,695    2,762    3,413   11,699   
                     -------- -------- -------- -------- --------   
  Margin                3,221    3,055    3,138    3,937   13,351   

Marketing                 410      400      400      520    1,730   
Payroll                 1,590    1,590    1,590    1,590    6,360   
Miscellaneous               0        0        0        0        0   
                     -------- -------- -------- -------- --------   
  Total_Expenses        2,000    1,990    1,990    2,110    8,090   

    Profit              1,221    1,065    1,148    1,827    5,261   
                     ======== ======== ======== ======== ========   
    Profit_%            20.18    18.52    19.46    24.86    21.00   
    Margin_%            53.24    53.13    53.19    53.56    53.30

Use the following script to create Sample 6:

<PAGE (Scenario, Product, Market)
{ PAGEONDIMENSION Product PAGEONDIMENSION Market }
Budget
<ICHILDREN Product
<IDESCENDANTS Market
      <COLUMN (Year)
      <ICHILDREN Year
<ROW(Accounts)
{ SUPBRACKETS DECIMAL 0 }
Sales 
Cost_of_Goods_Sold
{ UDATA "-" }      //line formatting command
Margin
{ SKIP }
Marketing
Payroll
Miscellaneous
{ UDATA "-" }      //line formatting command
Total_Expenses
{ SKIP }
Profit
{ UDATA DECIMAL 2 }    //line formatting command
Profit_%
Margin_%
    ! 

Format commands apply to members that follow the commands. The report begins each new page with the formats in place at the end of the previous report page. For example, if a report page ends with two decimal places, the following page begins with two decimal places. This report demonstrates the use of several important format commands:

  • DECIMAL-The script for this report specifies the DECIMAL 0 format command before the Sales member.

  • SUPBRACKETS-By default, negative numbers are enclosed in brackets, ( ). The SUPBRACKETS format command causes negative numbers to be output with a minus sign.

  • UDATA-The UDATA command places underline characters under data columns. The character is specified within double quotes. The default is a double underline.

This report script, COMBO2.REP, is available in the \ARBORPATH\App\Demo\Basic directory.