This discussion is archived
4 Replies Latest reply: Jan 8, 2013 4:06 AM by AlokDubey RSS

About formula column in oracle report

981504 Newbie
Currently Being Moderated
I want the output value of the formula column in my report between two brackts ....ex: (28.99) ...can anyone give me the idea
  • 1. Re: About formula column in oracle report
    ranit B Expert
    Currently Being Moderated
    978501 wrote:
    I want the output value of the formula column in my report between two brackts ....ex: (28.99) ...can anyone give me the idea
    - What kind of explanation is this?
    - Just have a look at the other posts regarding how one should explain their requirement.
    - Without knowing anything about your requirement, how do you expect people to give you some idea?

    What report is that? What format? Table/Columns?

    Just a guess+ ...
    /* replace */
    OUTPUT_COLUMN_VALUE
    /* with */
    '(' || OUTPUT_COLUMN_VALUE || ')'
  • 2. Re: About formula column in oracle report
    981337 Newbie
    Currently Being Moderated
    Hi,

    You can create a placeholder column and assign the formula column output to it.

    In placeholder column u can append before assigning.

    Hope it is helpful to you.

    Thanks!

    Edited by: 978334 on Dec 31, 2012 5:29 AM
  • 3. Re: About formula column in oracle report
    Peter vd Zwan Expert
    Currently Being Moderated
    Hi,

    Try this:
    with a as
    (
    select 28.99 num from dual union all
    select 12.65 num from dual union all
    select 1.33 num from dual union all
    select 112312.12 num from dual union all
    select 1123123.65 num from dual 
    )
    
    select
      '(' || to_char(num) || ')'
    
    from
      a
    ;
    '('||TO_CHAR(NUM)||')'                   
    ------------------------------------------
    (28.99)                                    
    (12.65)                                    
    (1.33)                                     
    (112312.12)                                
    (1123123.65)                               
    Regards,

    Peter
  • 4. Re: About formula column in oracle report
    AlokDubey Newbie
    Currently Being Moderated
    Do u mean that brackets have to be appeared only when the value is +ve/-ve. then you need to use (9999) in the format mask of the property pallette of the text column. if you want to use the brackets for all the data, then the solution has been provided by many of our frnds.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points