Dynamic Selection of Report Column Format

Is it possible to dynamically set the number format on a report column? I thought it would be as easy as setting the 'Number/Date Format' to a session state variable such as &NUMBER_FORMAT. However, when I tried this the column returned the following value ##########.
Any ideas?
Thanks,
David

OK, this is a favorite hack of mine combined with Sergio's suggestion. Essentially, we select the column twice, display it with one column using Sergio's idea and sort it on another hidden and unformatted copy of the column (hope I didn't lose you yet):
1) Add another column of the same source to the query and give it an alias:select ename,to_car(sal,'&NUMBER_FORMAT.') sal,sal sal_sort
  from emp2) Edit the report > report attributes > sal_sort column attributes. In the HTML Expression field, type #SAL#.
3) On the report attributes page, unclick the "Show" column for sal.
Now you are displaying the SAL column in the SAL_SORT column allowing the reporting engine to properly sort the column based on the unformatted SAL_SORT. I use this technique a lot for quarters. I'll show Q105, but it's sorting on an actual date behind the scenes.
Happy hacking!
Tyler

Similar Messages

  • Report column format

    What are valid values for the reports column format field?
    Can't find it in the help, searched the forum and looked in a selection of the pre-defined reports. Very few of the reports seem to have columns defined, and the one I did find was something like {0,date,medium}.
    It would make more sense to use something like SQL*Plus column formats,

    I am familiar with the to_char(number) function. I just tried it in the report as suggested. It does not format the columns in the user defined report. I tryed the same statement using a number in sqlplus and it worked fine.
    This is what I'm trying to do, I copied the free space report so I could get a %free and i'm trying to format the numbers.
    to_char(kbytes_alloc,'999G999G999G999D99) "Allocated MB".
    I want the numbers to have 2 decimal places.
    There is a column tab when creating a user defined report that would imply it formats that column.
    Thank you in advance for help. By the way, I'm using the 1.1.0.21 build MAIN 21.7

  • 'Plant Location' field in dynamic selection of report

    Hi Experts,
    I have entered some value in plant location in WBS org. data tab and want to filter the report by giving this field in dynamic selection of reports. But this field is not availble in dynamic selection. how we can add the same, even this is standard field in PRPS table (PRPS-STORT). Pls help.
    Regards
    Dinesh Chauhan

    In standard SAP this field is not set for dynamic selection
    you can create your customer view with STORT activated or you can change the STD view
    SE36
    enter PSJ as logical database
    go to menu path (in that same screen)
    Extras -> selection views
    this will default to CUS (short for CUS view)
    change this to SAP and change button
    In the table node section scroll down till you come to table PRPS_R then double click on that
    in the table field section below enter B2 next to the stort field (you may to scroll) - this means that this will now be visible in the org unit section for WBS in dyn selection
    save etc and then re try

  • Dynamic Selection on report not working

    Dear all,
    I have several reports on which the dynamic selection is not working. For instance, the report CN43N. The report is outputting all data in a year i.e it is disregarding the condition I specified in the dynamic selection fields.
    Is there some configuration to make to this report so that the dynamic selection works?
    Thanks for ur help.
    Nas

    Also Nelmaz,
    I have just checked OSS notes and found below note helpful to you:
    Note 1059465 - CN43N: Dynamic selections for scheduling data of WBS elemnts
    Symptom
    You cannot use transaction CN43N to create dynamic selections for scheduling data of WBS elements (table PRTE). You can use transaction CNS43 to do so.
    Hope this helps.
    Please assign points as way to say thanks

  • Interactive Report Column Formating '%' symbol

    Hi,
    I have an intercative report that shows a column displaying a number and and the sysmbol %. The source query is similar to:
    SELECT my_number||'%' as display_percentile
    FROM dual;
    Because of this the interactive report will only show this column as a string type and not number type, therefore my math filtering options are not available. Is there a way that I can display the column as a number type and still have it display as 50%
    I am using Application Express 4.1.0.00.32
    Thanks in advance.
    Edited by: 968358 on 05-Dec-2012 02:09
    Edited by: 968358 on 05-Dec-2012 02:10

    968358 wrote:
    Thank you fac586,
    Forgive me, I am a newbie at this and I am still at a loss. Where can I change the report column attributes to reflect css and alike. Do I need to do this on the report template or in the column attributes. When I have looked in the column attributes I cant see anywhere other than on the column link.Add a style sheet using the page HTML Header property attribute:
    <style>
    /* Replace COLUMN_ALIAS with the alias of the % column in your report */
    td[headers="COLUMN_ALIAS"]:after {
      content: "%";
    </style>

  • Dynamic selections in Report category

    I am trying to create a dynamic selection view for a report category, while doing so i am not able to add any table to table dialog that appears, when i enter PA0001 it says PA0001 is not a table. Same problem for any table i try to insert.
    Can anyone help me with a solution.
    Thanks in advance.

    In transaction SE80, i selected "edit object" button -> in the screen that pops-up i selected the tab "more"
    In that tab i selected radio button "Selection View" and then selected create button
    Then  "Create Selection View" screen appears, there i selected CUS View, checked radio button "for any tables" and gave a name of view 'ZTEST' and pressed the continue button, A screen appears to enter tables, when i enter any table it gives the message Table not found.
    When i try in other systems it works, not sure of the problem in our dev system.
    Thanks,
    Thirumal

  • SQL Report columns formatting

    Hi Everyone,
    I've got a basic report with a column that is a concatenation of other columns (used for break formatting), and I want to give the effect that there are still separate 'columns' in the concatenation. I've tried using CHR(9) and RPAD in the SQL query to add the 'whitespace' but as soon as Apex gets hold of it, the extra spaces are removed and I'm left with only a single space.
    It does the same thing when the "Display As" value is changed to either "standard report column", or any of the "Display as text" types.
    Any ideas? This is apex 4.0.0
    Thanks!

    I've got a basic report with a column that is a concatenation of other columns (used for break formatting), and I want to give the effect that there are still separate 'columns' in the concatenation. I've tried using CHR(9) and RPAD in the SQL query to add the 'whitespace' but as soon as Apex gets hold of it, when the browser renders the output in accordance with the HTML spec the extra spaces are removed and I'm left with only a single space.The HTML specification instructs user agents to collapse white space characters, so spaces and ASCII tabs in options will be treated as a single space.
    In a standard report use
    <li><tt>white-space: pre</tt> in the CSS Style property for a CSS approach
    or
    <li>The HTML Expression property for a <tt>&lt;pre&gt;</tt> HTML wrapper (ensuring the Display Text As column attribute is Standard Report Column rather than the default Display as Text (escape special characters) ):
    <pre>#COLUMN_NAME#</pre>Better still, create a custom report template using suitable mark-up so that there are "separate columns" in the report.

  • Dynamic URL with report column not showing

    I created a URL based on a report column in select report region, however instead of seeing the URL link I see the whole text , what am i doing wrong ?
    Fee Detail
    select col1, col2,
    CASE
    WHEN DPF_CLIENT_FEE_TYPE ='THPSCL' THEN
    'Fee Detail'
    ELSE NULL END AS col3
    from table
    Thanks for your help
    Edited by: user5397822 on Dec 20, 2011 1:00 PM

    Check that the "Strip HTML" opion is not set to Yes on the Report Attributes page (Layout section).

  • Report Column formatting

    In 9.0.2, I need to make 1 of my report column headings print as the system date.
    ie.
    Purchases on 05-SEP-02.
    BALLS
    BATS
    Is there any way to do this in the column formatting page of reports?

    Hi,
    You cannot have sysdate in the column heading. You can put only in the additional plsql code section.
    Thanks,
    Sharmila

  • Report column format specification

    I know, I can use TO_CHAR function in the SQL query to specify the column format for a user defined report. But, there is a separate tab for formatting columns when you creating a new report.
    Does anyone know how to specify the column format in the "Create Report Dialog" box?
    I tried with "999,999.99" and "###,###.##", doesn't seem to work.
    Thanks,
    Senthil.

    Itt appears that on Vista/11G/SQLDev 5440 in the Create report dialog ..
    report child query column formatting is lost (not saved)
    report parent query column formatting according to java formats detailed here http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html
    such as ###,### do not take effect

  • Dynamically select detail report for a master report link item or button?

    I'm still new to APEX, so apologies if this sounds like a stupid question, but so far I can't find anything online about how to do the following.
    I have a simple report, and I want to be able to drill down from here to a detail report via a link item (or a button) in each row. The problem is that the specific detail report to use depends on a combination of values in the parent record.
    So if I have a parent record in the master report with values for columns 1/2/3 of A/B/C, I would drill down to a detail report against table X. If my parent record has values of D/E/F, I might drill down to a different detail report against table Y.
    I can build the individual reports easily enough, and I can set up a link item in the master report to drill down to a hard-coded detail report page. I can even generate the name (alias) of the relevant target report as an extra non-DB item in each row of the parent report. But I can't figure out how to allow each row in the parent report to actually link to a different detail report dynamically, depending on the contents of the parent row.
    Can anybody suggest an easy way to do this, or point me towards an online resource that would explain how to do this (preferably in basic terms that this APEX-newbie can understand)?
    Thanks for your help!

    Hi,
    When you say "Detail report" do you just mean a normal report of the child records for the selected master record or a tabular form style "Details report"?
    Using different reports on a page would, typically, depend on the value in a hidden page item - for example, P1_REPORT_TYPE. Your link could pass an appropriate value into this item and the second page would then use this as a Condition for each of the report regions - each region being conditionally displayed when the hidden item is a specific value.
    Andy

  • Dynamically change the report column name.

    Hi All,
    I have a report where i am showing data for greater than current week and year and the code of same is below
    SELECT
        item_number,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+1 THEN
                    quantity
            END
        ) plus_1,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+2 THEN
                    quantity
            END
        ) plus_2,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+3 THEN
                    quantity
            END
        ) plus_3,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+4 THEN
                    quantity
            END
        ) plus_4,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+5 THEN
                    quantity
            END
        ) plus_5,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+6 THEN
                    quantity
            END
        ) plus_6,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+7 THEN
                    quantity
            END
        ) plus_7,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+8 THEN
                    quantity
            END
        ) plus_8,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+9 THEN
                    quantity
            END
        ) plus_9,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+10 THEN
                    quantity
            END
        ) plus_10,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+11 THEN
                    quantity
            END
        ) plus_11,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+12 THEN
                    quantity
            END
        ) plus_12,
        SUM
        (   CASE
                WHEN year_week_num = to_number(to_char(sysdate,'IW'))+13 THEN
                    quantity
            END
        ) plus_13     
    FROM
        (   select
                re.item_number,
                row_gen.year_week_num,
                SUM(NVL(re.quantity,0)) OVER(PARTITION BY re.item_number ORDER BY row_gen.year_week_num) quantity,
                ROW_NUMBER() OVER(PARTITION BY re.item_number, row_gen.year_week_num ORDER BY NULL) rn
            from
                (   SELECT
                        to_number(to_char(sysdate,'IW')) + ROWNUM year_week_num
                    FROM
                        DUAL
                    CONNECT BY LEVEL <= 13
                ) row_gen LEFT OUTER JOIN
                        (   SELECT
                                le.item_number,
                                le.quantity,
                                to_number(to_char(sysdate,'IW'))+1 year_week_num
                            FROM
                                BACKLOG_WEEK_WH_AFTR_ATP le
                            UNION ALL
                            SELECT
                                re.item_number,
                                -re.quantity,
                                to_number(substr(re.year_week,-2,2)) year_week_num
                            FROM
                                BACKLOG_ATP_GT_CW re
                         ) re
                    PARTITION BY (re.item_number)
                    ON ( row_gen.year_week_num = re.year_week_num)
    WHERE
        rn = 1
    GROUP BY
        item_numberI have a item in the report page from which i am displaying which week this year holds and the code of same is below
    In the item source, i have selected source type as sql query return single value. and the current week is returning as "2011-WK30"
    select to_char(sysdate,'YYYY"-WK"IW') from dual;Please suggest how i can change the display of column dynamically. I want PLUS_1 to show as 2011-WK31, PLUS_2 to show as 2011-WK32 and so on for this week. When next week will come then the plus_1 should show as 2011-WK32, plus_2 to show as 2011-WK33.
    Any help how to do this?
    Thanks in advance
    Regards

    Hi,
    Go to the Report Attributes, in the Column Attributes section:
    1) Use Headings Type as PL/SQL.
    2) In the text area Function returning colon delimited headings write a PL/SQL anonymous block returning colon delimited headings.
    Hope it helps!
    Regards,
    Kiran

  • Dynamic alignment of report column and page item value

    Hi friends,
    I have an interactive report which contains the columns like
    <li>empno
    <li>Name
    In the above i have "empno" with a column alignment of left and a "Name" with a column alignment of left.
    Whether it is possible to override the data alignment that we set in the report according to the value of the application item like
    If my application item value is US, then i need the column alignment of both the column"empno" and "Name" to be left and if my application item value is AR, then i need the column alignment of both the column "empno" and "Name" to be right. Whether is it possible to achieve the dynamic alignment to the report data of both the columns "empno" and "Name" according to the application page item value.
    And also in the case of page item i have a page item with a name P1_NAME in which it has a Element Horizontal/Vertical alignment to left.
    I need that element alignment of the page item to behave dynamically according to the application page item, like if the application page item is US then the element alignment of the page item has to be left and if the application page item is AR then the element alignment of the page item has to be right.
    Whether is it possible to achieve my above two scenario's friends. Kindly help me with this.
    Thanks in advance.
    Brgds,
    Mini

    Kees,
    Your approach is excellent and brilliant:-)
    I tried with your steps and i can achieve those alignment in both ways like you said(either on page load/through DA).
    But im going with the DA way. I have certain query regarding this kees.
    <li>Suppose if the report, is classic whether i can go with the same approach that i have achieved alignment with the IR report.
    <li>Currently through the DA way, i used the page item in the condition. Is it possible to use the application item instead of page item in DA. Because im going to use the application item FSP_LANGUAGE_PREFERENCE for getting the code either 'AR' or 'US'.
    <li>Finally i need this kind of restriction for the page item also, consider like i have a page item P1_X with an Element Vertical/Horizontal alignment as left. Now i need to change that alignment to right according to the application page item value, hence i can give application item condition for the page item like below
    PL-SQL EXPRESSION: :FSP_LANGUAGE_PREFERENCE = 'AR'
    i need the element alignment of the page item to behave dynamically suppose if the application item value is AR then the element alignment of that page item has to be right if the application item value is US then the element alignment of that page item has to be left, irrespective of the page item Element Vertical/Horizontal alignment that was set to it.
    Thanks for your kind help
    Brgds,
    Mini

  • Help with report column formatting

    Hi,
    Simple question .... I have a report that has some fairly large text columns, and I want to fit the report onto one screen. Does anybody know how you can change the width of the column of a report, and get the text to wrap round within that cell ?
    thanks
    Tim

    Tim,
    You could change the display type of the longer fields to be text areas.
    You may also want to look at Carl AJAX app which has a feature which hides/shows detail data without the page being refreshed.
    http://htmldb.oracle.com/pls/otn/f?p=11933:22
    Select the HTMLDB and Javascript -> AJAX and DHTML -> AJAX -> Show Report with Detail option.
    Hope this helps
    Chris

  • Dynamic color in report column

    Hi, All
    I design a report and display the column as Text field,
    in the column "Element Attributes", I put in
    style= "width:400px;height:400px;background-color:green.;font-size:100px;font-weight:bold;text-align:center",+
    the column will be displayed in green color.
    I tried to make the colour more flexible but put in the color text into a text box, eg:P51_COLOR
    and I modified the "Element Attributes" to
    style= "width:400px;height:400px;background-color:&P51_COLOR.;font-size:100px;font-weight:bold;text-align:center"
    but the color wasn't display as what I expected.
    Anyone have solution for this?
    Thanks
    Edited by: pj**** on 26-Apr-2012 20:25

    Interactive Report or Classic?
    I presume it is "multi-row" and not single row as you mention column.
    Regards,

Maybe you are looking for

  • Charging led not working

    I have been using my blackberry Z10 for the past week and I noticed that despite being told that the LED light should turn green when the battery is fully charged, and my settings are all correct, this simply is not happening. I was wondering if it c

  • Any link available between movemettype  to  order number

    Dear all, I have requirement for a report from PM, a link  is need to get the ordernumber based on Movementtype. it would be very helpful for me Thanks & Regards, gopal

  • No photos on ipad but still uses 1.6GB

    I've deleted every photo and video on my iPad, still the usage stats tell me it's using 1.6 GB for photos & camera !! I've got an iPad 3, iOS 8.2, 64GB WiFi. What's wrong????

  • Home button wont work

    My home button stopped working.. I was wondering if there was anything I can do to make it work again? I basically have to turn my phone off and on to get to a certain page..

  • FSCM : FSCM_COMMITMENT_UPDATE_ORDER

    Hello All, We have copied all the methods from example implementation and Methods are triggering. We ignored PI and Used direct update method. But my issue is Credit exposure not updating and FSCM called and message also through. Method FSCM_COMMITME