Sample 9: Creating Custom Page Headings
This Essbase report script sample shows how to create a custom header for a report.
This report builds on Sample 8: Creating Custom Headings and % Characters by adding custom page headings. By default, page dimension members are output at the top center of a report page. This section shows a representative part of the output.
Prepared by :admin The Electronics Club Page: 1
Actual Profit by Product 12/12/01
Product: Stereo
Jan Feb Mar Apr May Jun
New York 1.43% -10.00% -3.51% -2.22% 1.14% -6.18%
Boston -0.34% -2.51% -4.44% -4.89% -7.02% -13.15%
Chicago -0.65% -0.72% -2.28% -3.53% -6.33% -10.79%
San Francisco 1.43% -1.87% 4.42% 2.15% -1.26% 0.66%
Seattle 0.95% -5.66% 1.42% -6.82% -11.47% -12.34%
Denver 3.03% -1.11% -5.88% -6.52% -5.17% -13.83%
Los Angeles -1.50% -3.94% -2.86% -3.29% 3.12% -2.51%
Dallas #Missing #Missing #Missing #Missing #Missing #Missing
Houston #Missing #Missing #Missing #Missing #Missing #Missing
Phoenix #Missing #Missing #Missing #Missing #Missing #Missing
East 0.18% -4.47% -3.39% -3.41% -3.60% -9.70%
West 0.98% -2.95% -0.13% -2.81% -2.62% -5.61%
South #Missing #Missing #Missing #Missing #Missing #Missing
Market 0.65% -3.56% -1.44% -3.06% -3.03% -7.29%
Prepared by :admin The Electronics Club Page: 2
Actual Profit by Product 12/12/01
Product:Compact Disc
Jan Feb Mar Apr May Jun
New York 32.51% 29.95% 35.30% 32.70% 30.45% 31.73%
Boston 33.42% 27.92% 33.98% 30.74% 27.45% 30.85%
Chicago 34.29% 30.48% 26.33% 28.83% 28.11% 33.76%
San Francisco 37.77% 35.02% 33.41% 33.23% 35.32% 37.95%
Seattle 40.41% 38.33% 38.89% 37.06% 37.01% 38.29%
Denver 31.93% 32.10% 34.82% 29.15% 32.71% 30.85%
Los Angeles 31.65% 30.22% 30.22% 31.45% 27.06% 33.20%
Dallas #Missing #Missing #Missing #Missing #Missing #Missing
Houston #Missing #Missing #Missing #Missing #Missing #Missing
Phoenix #Missing #Missing #Missing #Missing #Missing #Missing
East 33.35% 29.50% 32.30% 30.92% 28.77% 32.09%
West 35.51% 33.94% 34.21% 32.77% 33.16% 35.25%
South #Missing #Missing #Missing #Missing #Missing #Missing
Market 34.60% 32.10% 33.41% 32.01% 31.35% 33.97%
Prepared by :admin The Electronics Club Page: 8
Actual Profit by Product 12/12/01
Product:Product
Jan Feb Mar Apr May Jun
New York 22.71% 21.43% 13.11% 10.54% 9.73% 13.16%
Boston 24.98% 23.25% 19.95% 18.00% 17.03% 18.62%
Chicago 22.01% 17.94% 18.14% 15.45% 18.70% 16.01%
San Francisco 23.71% 20.60% 21.93% 20.45% 21.44% 19.98%
Seattle 21.06% 21.05% 21.24% 19.00% 21.72% 15.13%
Denver 21.61% 16.01% 19.79% 14.81% 20.66% 13.89%
Los Angeles 17.54% 15.51% 17.03% 14.33% 17.59% 16.09%
Dallas 15.67% 16.50% 15.32% 13.93% 20.36% 15.49%
Houston 20.01% 20.29% 20.62% 15.87% 23.60% 12.38%
Phoenix 20.01% 16.12% 17.18% 16.50% 21.39% 15.22%
East 23.19% 20.84% 16.89% 14.42% 14.94% 15.78%
West 21.02% 18.35% 19.99% 17.26% 20.30% 16.61%
South 18.39% 17.53% 17.59% 15.36% 21.66% 14.46%
Market 21.37% 19.09% 18.46% 15.92% 18.67% 15.93%
Use the following script to create Sample 9:
<PAGE (Accounts, Scenario, Product)
<IDESCENDANTS Product
<SORTLEVEL
{ PAGEONDIMENSION Product }
{ STARTHEADING
TEXT 1 "Prepared by:"
14 "*USERNAME"
C "The Electronics Club"
65 "*PAGESTRING"
SUPPAGEHEADING
UNDERLINECHAR " "
TEXT C "Actual Profit by Product"
65 "*DATE"
TEXT 1 "Product:"
10 "*PAGEHDR 3"
SKIP
ENDHEADING }
Profit_%
Actual
<COLUMN (Year)
Jan Feb Mar Apr May Jun
<ROW(Market)
{ DECIMAL 2 AFTER "%" SUPBRACKETS UNDERSCORECHAR " " }
{ INDENTGEN 1 }
<IDESCENDANTS Market
!
The SUPPAGEHEADING format command suppresses the default page headings from output.
The *PAGEHDR command customizes the location of page member labels. The Sample 9 script uses page heading number 3, Product because this is the third page dimension.
You may have also noticed that member names do not have underscores. The UNDERSCORECHAR format command blanks out underscores.
Another difference is the underlining of column headings. The UNDERLINECHAR format command causes the underlining to character to change to the character in quotes.
The report rows are also sorted according to their levels in the database outline. Sort commands, such as SORTLEVEL, do not affect individual members selected in reports. Instead, these commands work in conjunction with member selection commands.
Note:
You can use only one sort command in a report.
Sample 9 reverses the indentation of levels from previous reports. The INDENTGEN command indents members to the specified number of characters.