RTF template

 

 

 

/invoices/InvoiceListing2 : 利用循环语句  <?for-each:G_VENDOR_NAME?>  <?end for-each?>

/invoices/InvoiceListing3:求总和   <?sum(ENT_AMT)?>

/invoices/InvoiceListing5:  页面页脚 tips:you cannot use form fields in the header so you’ll need to use the full placeholder text if you want to use data in the header.

/invoices/InvoiceListing6:  NUM格式  format-number(ENT_AMT, "###,###.00" ) which would convert 1234.5 to 1,234.50

/invoices/InvoiceListing6:  按照某一列再分组  for-each-group:G_INVOICE_NUM;INVOICE_CURRENCY_CODE -- 循环数据/在分组列 current-group()指定当前新组

/Sales Report/Retail Sales:   1 图表显示数据   2 分组下在分组    

                                                               <?for-each-group:ROW;./YEAR?><?sort:YEAR?>  --按照year分组

                                                               <?for-each-group:current-group();./MONTH?>      --在当前year分组的情况下 按 month分组

                                                               <?for-each:current-group()?>                              --在当前group下循环

/Shape/cd :  可以根据指定数值重复星星  Replicating a data Shape

---关于for-each@shape的定义----------------------------------

代码
You can replicate a shape based on incoming XML data in the same way you replicate data
elements
in a for-each loop. To do this, use a for-each@shape command in conjunction
with a shape-offset declaration. For example, to replicate a shape down the page, use the
following syntax:
<?for-each@shape:SHAPE_GROUP?>
<?shape-offset-y:(position()-1)*100?>
<?end for-each?>
where
for-each@shape opens the for-each loop for the shape
context
SHAPE_GROUP
is the name of the repeating element from the XML file. For each occurrence
of the SHAPE_GROUP element, a new shape will be created.
Copyright © Oracle Corporation,
2007. All rights reserved.
Advanced RTF Template Techniques
Chapter
8 - Page 30
shape
-offset-y: Is the command to offset the shape along the y-axis. (position()-
1)*100) sets the offset in pixels per occurrence. The XSL position command returns the
record counter
in the group (that is, 1, 2, 3, 4, and so on); one is subtracted from that number
and the result is multiplied by 100. Therefore, for the first occurrence, the offset would be 0:
(
1-1) * 100. The offset for the second occurrence would be 100 pixels: (2-1) *100. And for
each subsequent occurrence, the offset would be another
100 pixels down the page.

 /supplier/  描述table循环的。focus on table3  实现了分行显示

 判断条件 <?for-each:G_VENDOR_NAME?><?if:position() mod 2=0?>   

 position() function will return a number for the row    positon() =1 when first row

 /Advanced/BFwd-CFwd: 添加template模板在每次显示group的时候  <?template:header?><?end template ?>    <?template:footer?><?end template?>

/Advanced/Conditional:  条件更改字段属性 

<?if:ACCTD_AMT>1000?><xsl:attribute xdofo:ctx="block" name="background-color">green</xsl:attribute><?end if?>  如果ACCTD_AMT>1000 变绿

/Advanced/Dynamic Columns:  没看懂

/Advanced/Variables  定义变量:  document:http://xlspe.com/news.php?extend.23

<?xdoxslt:set_variable($_XDOCTX'variable name'value)?>    定义变量  Use the following syntax to declare/set a variable value
<?xdoxslt:get_variable($_XDOCTX'variable name')?>  获取变量的值        Use the following syntax to retrieve a variable value
<?xdoxslt:set_variable($_XDOCTX'x'xdoxslt:get_variable($_XDOCTX'x' 1)?>  == x:=x+1  
The $_XDOCTX specifies the global document context for the variables
 
posted @ 2010-12-08 11:09  热爱享受生活  阅读(1437)  评论(0)    收藏  举报