Oracle BI Publisher - 如何将数字格式化为文本以便前导零不会消失
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18335486/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle BI Publisher - How to format numbers as text so that leading zeroes don't dissappear
提问by Superdooperhero
When creating an Oracle BI Publisher rdf template in Microsoft Word, with intended output to Microsoft Excel; is there a way to format numbers as text so that leading zeroes don't dissappear? I would like to print out telephone numbers and they have values such as 0215551234; where I want the leading zero to show. In BI Publisher this shows as 215551234.
在 Microsoft Word 中创建 Oracle BI Publisher rdf 模板时,预期输出到 Microsoft Excel;有没有办法将数字格式化为文本,以便前导零不会消失?我想打印出电话号码,它们具有诸如 0215551234 之类的值;我希望显示前导零的地方。在 BI Publisher 中,这显示为 215551234。
回答by foobarbaz
In BI Publisher properties for the field check Force LTR option
在字段的 BI Publisher 属性中,检查 Force LTR 选项
or you can put the following in form field help text
或者您可以将以下内容放入表单字段帮助文本中
<fo:bidi-override direction="ltr" unicode-bidi="bidi-override"><?YOUR_TEL_FIELD?></fo:bidi-override>
回答by paz
I'm not sure if you still need this, but here is an example of a solution I found on the Internet (and it's on SQL level so you don't need to worry about complicated XML codes):
我不确定你是否仍然需要这个,但这里有一个我在互联网上找到的解决方案的例子(它在 SQL 级别,所以你不需要担心复杂的 XML 代码):
SELECT '="' || q.item_code || '"' excel_display_item_code
FROM (SELECT '00005689' item_code FROM DUAL
UNION
SELECT '00000012' item_code FROM DUAL
UNION
SELECT '01345677' item_code FROM DUAL) q;