The Essbase Report ScriptJust like other Essbase file objects, Essbase database report scripts are actually ASCII text file objects with an extension of .rep.. An Essbase report script m
Trang 1The Essbase Report Script
Just like other Essbase file objects, Essbase database report scripts are actually ASCII text file objects with an extension of rep As with other similar Essbase file objects, they must also follow the same naming convention of upto 8 characters, and the
directory path must not contain any spaces
An Essbase report script may be stored anywhere in the file system, but is considered
to be in its default location when saved into the database folder on the analytic
server, much the same as a database calculation script The benefit of storing the
report script file objects in their default location comes when you are coding an API
or EssCmd function, you only need to mention the name of the report script and not the fully qualified path to that particular object
Okay, so what exactly is an Essbase report script? Well, an Essbase report script
is an ASCII text file that contains commands or instructions for data retrieval,
formatting, and output that Essbase uses to extract data from an Essbase cube into
either a formatted report or an ASCII text flat file that can be sent to downstream
systems as a data feed
While report scripts are certainly capable of creating reports, hence the name,
an Essbase report script is more than likely used to extract data into flat files
Most Essbase users seem to prefer reports created in Microsoft Excel as opposed
to free standing plain paper reports
Trang 2How to create an Essbase Report Script
There are three ways to create an Essbase report script Because a report script is
really an ASCII text file with a rep extension, the first way to create one would
be to open a new text file in any text editor and begin typing the report script
commands We really do not recommend this method as you would have to be
highly skilled in the Essbase report script area A text editor like Notepad that is
included with Windows, is best suited for editing an already existing report script
To access a complete listing of all available Report Writer commands, get to your
EAS screen and click Help | Information Map | Technical Reference | Report
Writer Commands Here you will find an overview as well as each report writer
command function explained with coding examples This information is included
with your EAS installation
The second way to create an Essbase report script is to use the Essbase report script editor supplied with the EAS The report script editor can be accessed in much the
same way as accessing the calculation script editor
You should know this drill by now In EAS, drill-down to the database for which
you wish to create an Essbase report script
Double-click on the database name to expand the selections and right-click on the
report scripts heading The set of options displayed will offer you the choice of
editing an existing report script or creating a new one Selecting either choice will
open the Essbase report script editor
Trang 3The use of the built-in Report Script Editor is exactly like the Calculation Script
Editor described in detail in Chapter 5 As shown in the following screenshot,
the Report Script Editor window is divided into three basic sections:
Just like the Calculation Script Editor, the upper left section of the Report Script
Editor contains a smaller version of the outline editor This section allows you to
drill-down to desired members When you click on a desired member in the outline
representation, the member name will automatically be pasted into the script editor
where you have the cursor placed This reduces typing effort and also the potential for typographical errors in your script caused by misspelled command or function names The lower left section of the editor contains a listing of all of the report script
commands and functions Just like the Calculation script editor, when you click
a desired command or function, it is pasted into your script at the position of
the cursor
Finally, the third and best method of creating an Essbase report script is to
Trang 4We actually recommend this as the primary method of report script creation while
keeping the other two methods for editing existing scripts
We will discuss the Essbase Query Designer in-depth in the next chapter So, for
now, we will go over just briefly why we like this method
For starters, the Essbase Query Designer allows you to visually select database outline members you wish to include in your report or extract It also allows you to decide the placement of the column members and the row members While the resultant query is designed to be used with a Microsoft Excel worksheet, when you save the query, you also have the option of having Query Designer create an Essbase report script from the parameters and selection criteria you specified in your query
With very little modification, an automatically generated Essbase report script can
be executed from EssCmd scripts, API calls, or MaxL command scripts
Another benefit of using the Query Designer to generate a report script is that it will properly code complex functionality for you Therefore, there are no elusive syntax errors for you to debug
Report script commands and functions
Well, just like the calculation scripts, there are several different categories of Essbase report script commands and instructions Unlike the calculation commands and
functions, the report script commands and instructions basically deal with data
selection and formatting
As we said earlier, the arsenal of data selection commands and instructions is perhaps not the most robust when compared to the specific commands available to a user of
SQL for instance This can occasionally result in more data than is required being
returned This is hardly an issue that is worth fretting over
We will list for you here the complete report script command and instruction
categories For each category, we will give examples of a couple of the most commonly used commands or instructions For a complete list of all Essbase report script
commands and instructions, please refer to the EAS Online Help that is supplied with each installation of EAS
Trang 5Report layout commands
The report layout commands tell Essbase how you are setting up your report page
with regards to what members will be row members and what members will be
column members Some members will also be page members, where their attribute
applies to all of the data selected and does not need to be represented in either a row
or column
The syntax of these members is discussed below:
• COLUMN
Syntax:
<COLUMN(comma separated dimension list)
Example:
<COLUMN("Calendar Periods", "Scenario")
This example will place members from the Calendar Periods and
Scenario dimensions into the report output as column members