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

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

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

To handlethousand/decimal delimiter formatting you need to do a little work on yourtemplate. XSL supports any delimiters but it needs to be told what to use. Youdo this by declaring the decimal format in your template thus:

Name – is the nameyou give you format, this can be referenced from your format-number calls

Decimal-separator –this is the character you wish to use as the decimal point Grouping-separator –this is the character you wish to use to denote the thousand separator.

There are severalother options that can be set but these are the basic two. Please note the useof the xdofo:ctx=”begin” – this is an advanced feature which forces the decimalformat declaration to the root of the template no matter where it is put in thephysical RTF.

So when we call theformat function this time we use:

This time 1234.5 willbecome 1.234,50 asexpected. Note the format string has changed this time.

2. The other alternative is to use MSWord?s native field formatting. If you open one of the fields below you?ll notice that there is a field type drop down list that includes ?Number? as an option. You can select this, and then select the number format you require.

3. XDO Formatting – once finalized XDO will format the numbers and dates according to runtime locale settings. Details to follow. In this template the

Entered Amt uses

Accounted Amtuses

三十四:BIPUBLISHER图 1, 导入数据

2, 插入BIPUBLISHER图 3, 选择分组的数据拖入框内

4, 选择类型(会根据数据提供可供选择的类型) 5, 设置相关参数就OK

三十五.加密,字体

举例

This document issecured with a password - ********* This is a barcodefont: 12132435353 Thisis a MICR font: 121313&33433

Template Level Property Support

You can now embed any of the XML Publisherproperties into your RTF template <>These would then be resolved at runtime by the XML Publisher engine; you caneither use hard coded values or embed the values inside the incoming XML data.For example you might use a non standard font in your template and you wouldnormally have to use a configuration file to specify the font location atruntime for XML Publisher to use. Embedding the font property inside thetemplate you can avoid the use of the configuration file.

If you wanted to secure PDF outputgenerated from a template you can use the XML Publisher pdf security propertiesand obtain the password value from the incoming XML data.

To add an XML Publisher property to atemplate, use the Properties dialog (File -> Properties):

The XML Publisher properties need to have'xdo-' as a prefix to their regular names so 'pdf-open-password' becomes'xdo-pdf-open-password'. Just add the XML Publisher properties and their valueto the document using the dialog. If you want to reference a data element inthe XML, a password for instance then use the curly braces in enclose the pathto the XML element.

WorkedExample I – Embedding a font reference

Let’s assume you want to use a font in yourtemplate called 'XMLP Script', this is not available as a regular font on yourserver so XML Publisher requires that you tell it where the font is at runtime.If this location is known and fixed for wherever the template might bedeployed, let’s assume '/tmp/fonts' then you can set the font and its locationinto the template and XML Publisher will use it at runtime. In the propertiesdialog you would enter:

Name :xdo-font.XMLPScript.normal.normal Type :Text

Value :truetype./tmp/fonts/XMLPScript.ttf

When the template is applied to the XMLdata on the server, XML Publisher will look for the font in the /tmp/fontsdirectory.

WorkedExample II – Securing a PDF output

Let’s assume that the XML data you areusing will contain a specific password that needs to be used to secure theoutput document. Again we can use the document properties to set the PDFsecurity password and reference a value in the XML. Assuming the following XMLdata:

true

welcome

..

In the properties dialog we would enter twoproperties:

Name : xdo-pdf-security – this property sets whetherthe security feature is enabled or not Type :Text Value :{/PO/security}

Name : xdo-pdf-open-password – this property setsthe password Type :Text

Value :{/PO/password}

Storing the password in the XML data couldbe a security problem if the XML is going to persist in the system for anylength of time. To avoid this you could achieve the same using a templateparameter value that is generated and passed into the template at runtime.Assuming your parameters were called 'PDFSec' and 'PDFPWD' you would enter thefollowing in the properties dialog:

Name : xdo-pdf-security – this property sets whetherthe security feature is enabled or not Type :Text Value :{$PDFSec}

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

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