Skip to main content

Oracle BI Publisher - Leading zeros truncated for excel reports - format numbers as text


When you want to display some data which has leading zeros in EXCEL output you will not get the desired output. But in PDF it will come as what you are expecting. This is not with the issue of your data. This is due to the unique nature of EXCEL cell format. When you are trying to put a text data in a cell without making any change to cell format it will treat as number and it will truncate all leading zeros and all trailing zeros after '.' . So what you have to do is to convert that data into a format which EXCEL can treat as text.  

1. In the rtf template, add two spaces before the column.

2. Use the following xml tag

<fo:bidi-override direction=ā€ltrā€ unicode-bidi=ā€bidi-overrideā€> <?format-number:INVOICE_NUMBER;’09999999′?> </fo:bidi-override>ā€ 

3. Instead of the using the tag < ? INVOICE_NUMBER? >
use  =ā€<?INVOICE_NUMBER?>ā€. 

Excel treat value as character and doesn’t trim the leading zeors of value.

Comments

  1. my output type is pdf, but still am not gettign the leading zeros.
    Can i try adding:


    for gettign leading zero in pdf.

    ReplyDelete
    Replies
    1. This is some other issue. If the issue occurs in excel it will work in PDF. In your case this is different.

      Delete

Post a Comment

Popular posts from this blog

API to Create & Update Price Adjustment and Order Lines

Important Tables: select header_id from oe_order_headers_all; select line_id from oe_order_lines_all; select list_header_id from qp_list_headers_all; select list_line_id from qp_list_lines; CREATE OR REPLACE PROCEDURE apps.xxapply_discount (p_header_id number) IS    v_api_version_number           number := 1;    v_return_status                varchar2 (2000);    v_msg_count                    number;    v_msg_data                     varchar2 (2000);    -- in variables --    v_header_rec                   oe_order_pub.header_rec_type;    v_line_tbl                     oe_order_pub.line_tbl_type;    v_action_request_tbl   ...

Uninvoiced Receipts Query Oracle r12

Uninvoiced Receipts: SELECT   pha.segment1 po_number,          TO_CHAR (pha.creation_date, 'DD-MON-RRRR') po_date,          (SELECT   vendor_name             FROM   ap_suppliers ap            WHERE   ap.vendor_id = pha.vendor_id)             supplier_name,          pla.quantity,          pla.unit_price,          pla.quantity * pla.unit_price AS line_amount,          (SELECT   concatenated_segments             FROM   gl_code_combinations_kfv gcc            WHERE   gcc.code_combination_id = pda.code_combination_id)             charge_account,          rsh...