77范文网 - 专业文章范例文档资料分享平台

BI Publisher(rtf)模板开发语法大全(3)

来源:网络收集 时间:2019-03-28 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

This worksvery well but you should note that you are now performing calculations in themiddle tier which is not as performant as in the database. You should performas much of your business processing in the database as possible. You also notice that we can give somecontext to the total by adding another form field to contain the supplier name,, as we are in the invoices level we can simply referencethe parent vendor name value for the supplier.

可以对多个字段进行合计,由于页合计在XML数据中是不存在的,所以需要定义一个变量,定义变量的同时将计算的字段关联起来了 TotalFieldName:合计值对应的字段 ?element?:被合计的XML元素名称

十九. 显示页合计

TotalFieldName:合计值对应的字段 number-format:合计值显示的格式 例子:

二十.结转合计

某些报表要求将页的合计显示在页尾和下一页的页头,这种合计叫做结转合计。下面是结 转合计的例子:

在第一页的尾部显示了页的合计;在第二页的顶部结转显示了第一页的合计,依次类推

需要在页码的顶部实现结转合计,只要在每页的(除了第一页)顶部使用如下的语句:

举例:

Invoice Listing Report

1000 1000

Page Total:

1000 1000 1000 1000

Init PTs Invoice Type Invoice Invoice Number Date Invoice Entered Amount Accounted Currency Amount 1,000.00 1,000.00 EG FEINV_TYPE 132342 10-May-07 USD End PTs 二十一. 连续合计(同参数高级应用) 报表实现如下的累积合计值 1. 定义变量 2. 添加每行值 3. 显示累积合计值 xdoxslt:get_variable($_XDOCTX, ’VariableName’)?> xdoxslt:get_variable($_XDOCTX, ’RTotalVar’)?> 二十二. 排序

可以使用组中的字段对组进行排序,在组标记内插入如下的命令标记:

也可以对组中的多个字段进行排序:

……

二十三. 对XML数据从新分组

Youmay need to further group your data in addition to the existing grouping, inthis case we have: SUPPLIERS INVOICES

Ratherthan update the XML extraction, we can actually introduce a new group to thehierarchy in the template layer so we have: SUPPLIERS CURRENCY INVOICES

Wecan use a new function, ?for-each-group? to effectively regroup the data in thetemplate to show the invoices by currency code, we can then show summary totalsat the current level too. In the template below you notice that it has beenrestructured from the previous version. There is now a new table: TheReGrp:Curr field has the following:

for-each-group:G_INVOICE_NUM;INVOICE_CURRENCY_CODE Thisis specifying that we want to create a new group ?INVOICE_CURRENCY_CODE? based onthe original ?G_INVOICE_NUM? group.We then have the currency label/value pair, the invoice table then follows,inside the Grp:Invoice field we now have ?for-each:current-group()? torefer to the new INVOICE_CURRENCY_CODE group we have just created. Note: wecannot refer to the group as INVOICE_CURRENCY_CODE as this group is onlycreated at runtime. Sonow we have a new grouping we can create summary totals at this level togenerate totals per currency, inside the new fields we havesum (current-group()/ENT_AMT) for the enteredamount, again we use the current-group() tag to refer to the new ?INVOICE_CURRENCY_CODE? group. I Grp:SupplierDecimal Format Supplier Supplier 1 Address 1 Long Avenue ReGrp:Curr Currency: USD Invoice Number Grp:Invoice1134922 Type Standard Invoice Date GL Date En01-Jan-2007 01-Jan-2007 Total for USD End Curr 结果:多加了个分组Currency

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库BI Publisher(rtf)模板开发语法大全(3)在线全文阅读。

BI Publisher(rtf)模板开发语法大全(3).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/554072.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: