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

2019-03-28 21:33

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}


BI Publisher(rtf)模板开发语法大全(6).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:最新面试考试题目(含答案)-C-C++笔试题目

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: