ORACLE EBS XML Publisher report output character field the front "0" is automatically removed by Excel.

Source: Internet
Author: User

http://www.cnblogs.com/lzsu1989/archive/2012/10/17/2728528.htmlOracle EBS provides various forms of development and output of reports, and because of the obvious advantages of MS excel in processing data, report output is a common development item to open in Excel. but because Excel is "too smart to be smart", it sometimes causes output fields to be processed automatically by Excel, resulting in data errors. For example: The System internal field, the material Code/order label and so on the field stored in the database the format is varchar, in certain business or the demand, the encoding method is the full number form, like "100230001", "100230002",... Such a field is not a problem in the system, the report output to Excel also no problem, and the case may be, the number is "000031001", "000031002", "000031003",.... In this case, a 9-digit character is stored in the system, and after the report is output to Excel, Excel thinks that he is a number, not a string, so that the "0" before the string appears to be intercepted, becoming "31001", "31002", "31003",.... Such errors are not easy to detect, but they are a very unfriendly mistake. Workaround: 1. Concurrent Program output HTML reportThis type of report output is an HTML tag (or XML tag), this kind of report is truncated in the time of the output, the field is placed in the = "", for example, the Plsql code fragment is:fnd_file.put_line (fnd_file.output, ' <div>000031001</div> '); into:fnd_file.put_line (fnd_file.output, ' <div>= ' 000031001 ' </div> ');orfnd_file.put_line (fnd_file.output, ' <div> ' 000031001</div> ');

Explanation:The previous method, in Excel, = represents a formula, and in double quotation marks is the meaning of the string, that is, to set the current cell to be equal to the current value converted to a string meaning, similar to Oracle's TO_CHAR (); the latter method, in Excel, The cell value is preceded by a single quotation mark indicating that the cell is "bad formula", that is, the meaning of not automatically calculated, Excel cell to display the formula is also this method. 2. XML Publisher ReportXML Publisher reports In addition to the two methods above, you can also set the XML Publisher properties to solve this problem, directly look at the properties:

The <fo:bidi-override property is set to force LTR, is coerced to data format, and is not converted to a number in Excel, and the corresponding XML Publisher script code is: direction= "ltr" unicode-bidi= " Bidi-override "&GT;&LT;? Assembly?></fo:bidi-override>

ORACLE EBS XML Publisher report output character field the front "0" is automatically removed by Excel.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.