Sample 3: Nesting Columns
This Essbase report script sample demonstrates how to nest columns and suppress missing rows from the output.
Each page produced by this report sample contains Sales information for a given Market. The report has two groups of columns across the page. The Actual and Budget members are the nested column group below Year members.
Note that the Actual and Budget members are on the same line in the report. You can put multiple commands on one line, but report commands are easier to read if they are spread out.
Sales East
Jan Feb Mar Qtr1
Actual Budget Actual Budget Actual Budget Actual Budget
======= ======= ======= ======= ======= ======= ======= =======
Stereo 2,788 2,950 2,482 2,700 2,569 2,700 7,839 8,350
Compact_Disc 3,550 3,450 3,285 3,250 3,458 3,250 10,293 9,950
Audio 6,338 6,400 5,767 5,950 6,027 5,950 18,132 18,300
Television 5,244 4,800 4,200 4,300 3,960 4,300 13,404 13,400
VCR 4,311 4,200 3,734 3,700 3,676 3,700 11,721 11,600
Camera 2,656 2,850 2,525 2,670 2,541 2,670 7,722 8,190
Visual 12,211 11,850 10,459 10,670 10,177 10,670 32,847 33,190
Product 18,549 18,250 16,226 16,620 16,204 16,620 50,979 51,490
Sales West
Jan Feb Mar Qtr1
Actual Budget Actual Budget Actual Budget Actual Budget
====== ======= ======= ======= ======= ======= ======= =======
Stereo 4,102 4,000 3,723 3,600 3,808 3,600 11,633 11,200
Compact_Disc 4,886 4,700 4,647 4,400 4,788 4,400 14,321 13,500
Audio 8,988 8,700 8,370 8,000 8,596 8,000 25,954 24,700
Television 5,206 5,100 4,640 4,600 4,783 4,600 14,629 14,300
VCR 4,670 4,650 4,667 4,200 4,517 4,200 13,854 13,050
Camera 3,815 4,050 3,463 3,750 3,478 3,750 10,756 11,550
Visual 13,691 13,800 12,770 12,550 12,778 12,550 39,239 38,900
Product 22,679 22,500 21,140 20,550 21,374 20,550 65,193 63,600
/pre>
Sales South
Jan Feb Mar Qtr1
Actual Budget Actual Budget Actual Budget Actual Budget
======== ======= ======= ======= ======= ======= ======= =======
Television 3,137 3,400 2,929 3,100 2,815 3,100 8,881 9,600
VCR 3,225 3,400 3,206 3,100 3,120 3,100 9,551 9,600
Camera 2,306 2,400 2,167 2,400 2,168 2,400 6,641 7,200
Visual 8,668 9,200 8,302 8,600 8,103 8,600 25,073 26,400
Product 8,668 9,200 8,302 8,600 8,103 8,600 25,073 26,400
Sales Market
Jan Feb Mar Qtr1
Actual Budget Actual Budget Actual Budget Actual Budget
======= ======= ======= ======= ======= ======= ======= =======
Stereo 6,890 6,950 6,205 6,300 6,377 6,300 19,472 19,550
Compact_Disc 8,436 8,150 7,932 7,650 8,246 7,650 24,614 23,450
Audio 15,326 15,100 14,137 13,950 14,623 13,950 44,086 43,000
Television 13,587 13,300 11,769 12,000 11,558 12,000 36,914 37,300
VCR 12,206 12,250 11,607 11,000 11,313 11,000 35,126 34,250
Camera 8,777 9,300 8,155 8,820 8,187 8,820 25,119 26,940
Visual 34,570 34,850 31,531 31,820 31,058 31,820 97,159 98,490
Product 49,896 49,950 45,668 45,770 45,681 45,770 141,245 141,490
Use the following script to create Sample 3:
<PAGE (Accounts, Market)
Sales
<ICHILDREN Market
{ PAGEONDIMENSION Market }
{ SUPMISSINGROWS }
<COLUMN (Year, Scenario)
<ICHILDREN Qtr1
Actual Budget
<ROW(Product)
<IDESCENDANTS Product
!
The report selects four Markets because the <ICHILDREN command is applied to Market. Only Sales is selected from the other page dimension, so the report has four pages.
For the South, all the rows of Product data are not displayed. Recall that the cities in the South do not sell every Product. The report uses the SUPMISSINGROWS format command to suppress the output of any member rows with all missing values.