ESSBASE——report脚本命令与脚本整理

=============================================================================================================================
=============================================================================================================================
Report Writer Syntax(Report Writer 语法)
Report Delimiters(分隔规则)
    The < or {} delimiters are required for Report Writer commands. If you do not use a delimiter, Report Writer assumes that the command name is a member name.
    使用<或者{}封装命令.
    {} 对格式化命令进行封装.
    < 置于对象前.
-----------------------------------------------------------------------------------------------------------------------------
Syntax Guidelines(语法指导)
    Separate commands with at least one space, tab, or new line. Report processing is not affected by extra blank lines, spaces, or tabs.
    命令与命令之间隔一个或多个空格.

    Enter commands in either upper or lowercase. Commands are not case sensitive. If the Database Outline is case-sensitive, then the member names used in the report script must match the outline.
    大小写不敏感.不过要与outline的成员名字一致.
 
    To start report processing, enter the ! report output command (exclamation point or "bang"), or one or more consecutive numeric values. You can place one or more report scripts, each terminated by its own ! command, in the same report file.
    使用!输入一段命令结果数据.

    You can group more than one format command within a single set of curly braces. For example, these formats are synonyms:
      {UDATA SKIP}
      {UDATA} {SKIP}

    Enclose member names that contain spaces or the member name "Default" in double quotes; for example, "Cost of Goods Sold" "Default".

    If a formatting command is preceded by three or more of the characters "=," "-," and "_," the Report Extractor assumes that the characters are extraneous underline characters and ignores them. For example, ==={SKIP 1}

    Use // (double slash) to indicate a comment. Everything on the line following a comment is ignored by the Report Writer. Each line of a comment must start with a double slash.
    使用//注释.
-----------------------------------------------------------------------------------------------------------------------------
Referencing Static Members(静态成员)(**********)

 

-----------------------------------------------------------------------------------------------------------------------------
=============================================================================================================================
=============================================================================================================================
Report Writer Command Groups(命令分类)
Report Layout Commands(展示页面元素)(**********)
    A report layout is composed of items that make up the columns and rows of a page. Report layout commands provide column, page, and row layout, and include two commands that override the default method for interpreting column dimension member lists. Report Writer provides the following page layout commands:
    用于定义页,行,列命令.
 <ASYM
 <COLUMN
 <PAGE
 <ROW
 <SYM
-----------------------------------------------------------------------------------------------------------------------------
Data Range Commands(数据展示命令)
    Data range commands restrict the range of data selected for your reports. Report Writer provides the following data range commands:
    对所显示的数据进行约束.
 <BOTTOM
 <RESTRICT
 <TOP
-----------------------------------------------------------------------------------------------------------------------------
Data Ordering Commands(数据排序命令)
    Data ordering commands order data in your reports. Report Writer provides the following ordering commands:
    对所显示的数据进行排序.
 <ORDERBY
-----------------------------------------------------------------------------------------------------------------------------
Member Selection and Sorting Commands(数据选择与装载命令)(**********)
    Member selection commands enhance your selection options using member relationships based on the database outline. The Report Writer provides the following selection and sorting commands:
    增加数据选择能力.
 <ALLINSAMEDIM (所有维度) <IANCESTORS (祖先)  <SORTALTNAMES (选择名)
 <ALLSIBLINGS (所有兄弟)  <ICHILDREN (子成员)  <SORTASC
 <ANCESTORS (祖宗)  <IDESCENDANTS (子孙)  <SORTDESC
 <ATTRIBUTE (属性)  <IPARENT (双亲)   <SORTGEN
 <CHILDREN (子成员)  <LATEST (最近)   <SORTLEVEL (选择层)
 <CURRENCY (当前)  <LINK (连接)   <SORTMBRNAMES (选择成员名)
 <DESCENDANTS (子孙)  <MATCH (匹配)   <SORTNONE
 <DIMBOTTOM (最低层)  <OFSAMEGEN (同代)  <TODATE
 <DIMEND (最后维)  <ONSAMELEVELAS (同层)  <UDA
 <DIMTOP (最高维)  <PARENT (双亲)
 <DUPLICATE (副本)
----------------------------------------------------------------------------------------------------------------------------
Format Commands(格式化命令)


-----------------------------------------------------------------------------------------------------------------------------
Column or Row Calculation Commands(行,列计算命令)(**********)
    These commands perform column and row calculations that let you create extra columns or rows in a report (not defined as part of the database outline) based on selected data members. Enclose all calculation commands and their arguments in curly { } braces.
    添加格外的行或列,尽管这些行或列并没有在outline里定义过.把所有计算命令和规则封装到花括号{}中.
 CALCULATE COLUMN (计算列)  OFFROWCALCS (关闭行计算) SAVEANDOUTPUT (保存并输出)
 CALCULATE ROW (计算行)   ONCOLCALCS (定位列计算)  SAVEROW (保存行)
 CLEARALLROWCALC (清楚所有行计算) ONROWCALCS (定位行计算)  SETROWOP 
 CLEARROWCALC (清除行计算)  PRINTROW (打印行)
 OFFCOLCALCS (关闭列计算)  REMOVECOLCALCS (移动列计算)
-----------------------------------------------------------------------------------------------------------------------------
Member Names and Aliases(成员名与别名)
    These commands allow you to set aliases or alternate names that can make reports easier to read and help your reader focus on the data values rather than the meanings of member (page, column, and row) names.
    设置成员别名或成员名,让展示的数据更友好.
 <OUTMBRALT (输出成名为)
 <OUTALTMBR (输出成员名改为)
 <OUTALT (输出更改)
 <OUTALTNAMES (输出更改名字)
 <OUTALTSELECT (数据选择)

=============================================================================================================================
=============================================================================================================================
脚本命令:

命令: SYM
描述: <SYM
 The SYM command forces a symmetric report, regardless of the data selection. Use SYM  to change the symmetry of a report that Hyperion Essbase would create as an  asymmetric report.
 用于格式化显示格式。
-----------------------------------------------------------------------------------------------------------------------------
命令: WIDTH
描述: The WIDTH command specifies the width of columns in a report.
 指定列宽
用法: {WIDTH}
示例: <PAGE (Measures, Market)
 Illinois Sales
 <SYM
 {WIDTH 7}
 {WIDTH 20 0}
      <COLUMN (Scenario, Year)
      Actual Budget Scenario
      Jan Feb Mar
 <DESCENDANTS "100"
      !
-----------------------------------------------------------------------------------------------------------------------------
命令: RENAME
描述: The RENAME command renames a member within the report.
 在REPORT里更改成员名
语法: {RENAME "newMbrName"} mbrName
示例: { RENAME "Revenue" } Sales
 { RENAME "Cost of Goods" } Cost_of_Goods_Sold
 { RENAME "Gross Margin" } Margin
-----------------------------------------------------------------------------------------------------------------------------命令: SKIP
描述: The SKIP command skips one or more lines in the output report.
 This command outputs a number of blank lines in the report or a single line if n is omitted from the command.
 在REPORT表中输出一或多行.
语法: {SKIP n}
示例: {SKIP 2} //输出两个空白行
-----------------------------------------------------------------------------------------------------------------------------
命令: ICHILDREN
描述: The ICHILDREN command selects the specified member and all members in the level immediately below it.
 This command selects a member and its children, as defined in the Database Outline. <
 选择指定成员,并且选择与该成员层下一层的所有成员.
语法: <ICHILDREN mbrName
示例: <ICHILDREN Year  //选择Qtr1,Qtr2,Qtr3,Qtr4,Year
-----------------------------------------------------------------------------------------------------------------------------命令: OUTMBRALT
描述: The OUTMBRALT command sets the output name to the Database Outline member name followed by the Outline alias, as   defined in the current alias table.
 输出主名
语法: <OUTMBRALT
-----------------------------------------------------------------------------------------------------------------------------
命令: OUTALTNAMES
描述: The OUTALTNAMES command displays alias names for members in a report.
 输出别名
语法: {OUTALTNAMES}
-----------------------------------------------------------------------------------------------------------------------------
命令: ATTRIBUTE
描述: The <ATTRIBUTE command returns all base-dimension members that are associated with a specified attribute.
 返回属性维信息。(注意:使用该命令时要注意参数一定是属性维!)
语法: <ATTRIBUTE attMbrName
示例: <ATTRIBUTE dycy jgzd //dycy与jgzd是两个属性维
-----------------------------------------------------------------------------------------------------------------------------
命令: {BEFORE}
描述: The BEFORE command displays a character string before the data columns in the report.
     Quotes without a character string clear the text displayed before data columns. For example, { BEFORE "" } turns  off previously issued BEFORE commands.
 在每列数据输出前加一串字符.
语法: {BEFORE "char" [columnlist]}
示例: <PAGE Market, Accounts, Scenario)
 Chicago Sales Actual
  <COLUMN  Year)
  <ICHILDREN Year
 <ROW (Product)
 { BEFORE "$" }
 <ICHILDREN Audio
   !
-----------------------------------------------------------------------------------------------------------------------------
命令: <IDESCENDANT
描述: The IDESCENDANTS command adds the specified member and its descendants to the report.
     Adding the descendants of the top of the dimension adds all the members in the dimension to the report, including  the dimension top.
 选择子孙维
语法: <IDESCENDANT mbrName
示例: <IDESCENDANT 2004
-----------------------------------------------------------------------------------------------------------------------------
命令: <MATCH
描述: 通配符
语法: <MATCH ("Member"|"Gen"|"Level","Pattern")
示例: <MATCH(YEAR,J*)  //选择J开头的维成员
-----------------------------------------------------------------------------------------------------------------------------
命令: {NAMEWIDTH}
描述: 控制行宽
语法: {NAMEWIDTH n}
示例: {NAMEWIDTH 10}
-----------------------------------------------------------------------------------------------------------------------------
命令: {SCALE}
描述: 把数据相乘
语法: { SCALE factor [ columnList ] }
示例: {SCALE 2} //把所显示的数据在数据源的基础上乘以2
-----------------------------------------------------------------------------------------------------------------------------
命令: <WITHATTR
描述: 条件语句
语法: <WITHATTR(dimName,"operator",value)
示例: <WITHARRT(Population,">=","100000") //大于100000 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值