Excel Output From BI Publisher or XML Publisher is Trimming Leading Zeros

Excel导出保留前导零
本文介绍了解决Excel通过BIPublisher或XMLPublisher导出时自动去除数值前导零的问题。提供了多种解决方案,包括在rtf模板中插入特殊字符、使用特定的XML标签格式等方法。
部署运行你感兴趣的模型镜像
Excel Output From BI Publisher or XML Publisher is Trimming Leading Zeros

Symptoms
Created an XML Publisher report with Excel output.  When numeric data includes leading zeros, these are dropped in the output e.g. 00123 becomes 123.

Example source XML: 
<root> 
<invoices> 
<invoice> 
<invoice_number>0000123</invoice_number> 
</invoice> 
<invoice> 
</root>

Cause
Excel automatically trims leading and trailing zeros when in what it sees as numeric data.
To keep leading or trailing zeros where the data is not numeric but actually a string,
such as an invoice number, Excel has to see the numbers as a string value not numeric.

Solution

1. In the rtf template, use the “Insert -> Symbol” function to insert a very small
0xA0 (NO-BREAK SPACE) character (font size 1 or 2pt) in front of the number string field.

2. One can also try:

<fo:bidi-override direction="ltr" unicode-bidi="bidi-override"> <?format-number:INVOICE_NUMBER;'09999999'?> </fo:bidi-override>"

3. Another option:
During XML template design, Instead of the using the tag < ?TAG_NAME ? >
use  ="<?TAG_NAME?>". It wraps the value with double quotes. Now Excel treat value as character and doesn't trim the leading zeros of value.
Note: space between < and ? and tag name is not required.

4. Retest for the issue.

3. BI Publisher Cache Directory Filling Up and Pointing to Invalid Directory Instead of system-tmp-dir Parameter

Symptoms
Temporary and cache files are written to .../j2ee/home/applications/xmlpserver/xmlpserver/xdo/cache but not to the path configured in the file  web.xml file:

<param-name>system-tmp-dir</param-name> <param-value>/servers/bipublisher/XMLP/Cache</param-value> So no matter where has been set the temp directory, it still writes to the cache location. As a result when a report is submitted the file system is filling up.

Cause
The cause of this problem has been identified in unpublishedBug 9560562: BI PUBLISHER CACHE DIRECTORY FILLING UP AND POINTING TO INVALID DIRECTORY.

Fix for unpublished Bug 9560562 has been included in Patch 9791839 : UPDATE FOR BI PUBLISHER ENTERPRISE 10.1.3.4.1 JUNE 2010.

With this fix, Administrator can define System Temporary Directory from Admin->Server Configuration and BIP uses this directory for caching

Solution
1. Please apply the Patch 9791839 

2. Set the temporary directory in Admin->Server Configuration 

3. Bounce the services .

4. Then test again.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22816976/viewspace-2063204/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/22816976/viewspace-2063204/

您可能感兴趣的与本文相关的镜像

Stable-Diffusion-3.5

Stable-Diffusion-3.5

图片生成
Stable-Diffusion

Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值