The output from a report script can be used as the input to another report. The report output contains only member names and data, so you need to preface the new report with the header commands (as described above). Then append the member names output by the previous report onto the report header (not including the returned data, to avoid sending unnecessary information to the server), and execute that as a script. For example, if you first execute the following:
<COL("Year") <ROW("Market") "Actual" "Sales" "Cola" <CHILD "Qtr1" <CHILD "East" !
The resulting report output might look something like the following:
Actual Sales Cola Jan Feb Mar New York 36 32 39 Massachusetts 24 09 14 Florida 37 29 37 Connecticut 0 5 11 New Hampshire 12 10 11
Now if you send the header from the previous report (that is, the first two lines of format commands), strip out all data from the report output, surround all member names with double quotation marks, and append a bang (!) character, you should get the following report script:
{TABDELIMIT}{DECIMALS 0} <PAGE("Scenario", "Measures", "Product") <COL("Year") <ROW("Market") "Actual" "Sales" "Cola" "Jan" "Feb" "Mar" "New York" "Massachusetts" "Florida" "Connecticut" "New Hampshire" !
This script now generates the same report that the first script generated. This method is useful when performing a series of ad-hoc operations, such as drill-downs, on a view.
Essbase inserts spaces before certain member names. What is inserted depends on the <INDENTGEN report setting. Leading spaces must be removed if the members are subsequently used as part of a report script.