2 Replies Latest reply: Jan 22, 2013 5:39 PM by SleepDeprivedInSeattle RSS

    Classic Report: Download to CSV doesn't download numbers with carets

    SleepDeprivedInSeattle
      I have a page with a number of reports on it - so I have to use the Classic Report. Each of the reports has a "download to excel" option. And, because the report is a financial report, the users want the positive numbers to display normal and the <negative> numbers do display with the <> carets. This is possible using the standard format: 999G999G999G999G990D00PR

      But when they export the report to excel, the positive numbers export but the negative numbers are blank (they don't appear in the export at all).

      This works if I use an interactive report but, as mentioned above, i have multiple reports on the same page and I can't use the interactive report option.

      I have duplicated the problem on apex.oracle.com
      WORKSPACE: TEST_CLASSIC_REPORT
      USER ID: TEST_USER
      Password: blanket1

      Is this a bug with APEX? Is there a work-around I can use? I tried making the column twice with different formatting but it didn't want to work right.

      Thank you

      --seattle

      Using APEX 4.1.0.00.32
      Oracle 11g

      Duplicated the problem using APEX 4.2
        • 1. Re: Classic Report: Download to CSV doesn't download numbers with carets
          fac586
          SleepDeprivedInSeattle wrote:
          I have a page with a number of reports on it - so I have to use the Classic Report. Each of the reports has a "download to excel" option. And, because the report is a financial report, the users want the positive numbers to display normal and the <negative> numbers do display with the <> carets. This is possible using the standard format: 999G999G999G999G990D00PR

          But when they export the report to excel, the positive numbers export but the negative numbers are blank (they don't appear in the export at all).

          This works if I use an interactive report but, as mentioned above, i have multiple reports on the same page and I can't use the interactive report option.

          I have duplicated the problem on apex.oracle.com
          WORKSPACE: TEST_CLASSIC_REPORT
          USER ID: TEST_USER
          Password: blanket1

          Is this a bug with APEX?
          Could be. Something similar has been reported before: +{message:id=4395427}+
          Is there a work-around I can use? I tried making the column twice with different formatting but it didn't want to work right.
          Two versions of the column displayed conditionally should work.

          Add a copy of the required column(s) to the query:
          select
              test_table_id
            , test_table_desc
            , test_table_amount
            , test_table_amount test_table_amount_csv
          from
              test_table
          Set the format mask for the normal column to <tt>999G999G999G999G990D00PR</tt>, and leave that for the CSV column blank (or use a format that doesn't include the <tt>PR</tt> specification).

          Notice that the Export link URL uses an APEX <tt>REQUEST</tt> value beginning with "FLOW_EXCEL_OUTPUT" to determine that the report export has been requested:
          http://apex.oracle.com/pls/apex/f?p=66643:1:12896346742738:FLOW_EXCEL_OUTPUT_R10086972522979338823_en
          This <tt>REQUEST</tt> value can be used in a PL/SQL expression in column conditions to control which column is included. The condition for the normal column shown on screen is:
          coalesce(:request, 'X') not like 'FLOW_EXCEL_OUTPUT%'
          and that for the CSV column included in the export file is:
          :request like 'FLOW_EXCEL_OUTPUT%'
          • 2. Re: Classic Report: Download to CSV doesn't download numbers with carets
            SleepDeprivedInSeattle
            That was it! Thank you for all your help!