How to add a formula column in a report

Hi
I have made a report based on a query.
There are 3 columns in the query and all the 3 are displayed.
Now I want to add a new column (fomula column) to the report.
I want to write a query inside the formula column. To execute the query col1, col2 and col3 values are required in the formula column.
Could you please tell me how to add a formula column in the report and how to pass database column value to inside the formula column
regards

Here is how you would create a formula column:
Open data model of the report.
Formula column button is on the left side of the tool palette.
Click on that button.
Now click in the query group where you want to place the formula column.
You would see a new field something like CF_1. That is the formula column.
Double click on the field CF_1. It will open property inspector.
You would see, Datatype of the formula column is Number. Change this as per your requirement.
Double click on PL/SQL Formula property. It would open up a editor. Here you can write the code.
And now to access the data model column here, you can use : and column name. i.e. :col1 or :col2, etc
And remember you have to return the value back to the formula column. Like this: RETURN(some value).
You can also take a help from here:
http://download.oracle.com/docs/html/B13895_01/orbr_howto.htm#sthref1309
Hope this helps.

Similar Messages

  • How to add a new column to a report

    I want to add a new column to my existing report. I modified the using report wizard and added the new column. When I pressed 'Finish' I lost all my previous settings. Without changing the existing stuff, how can add a column to a table.
    Any help is appreciated.
    Regards
    Leena
    null

    go to the data model editor
    click on query .
    add new columns in select statement.
    add the corresponding fields in layout model
    compile it
    run it
    srini

  • How to add a new column in a report

    Hi all,
    I originally created a report with form. Then I want to add another column to it, but the column added wont display automatically in the report, instead you
    have to go to "action" and manually add the column so it can be diplayed in the report.
    How can I permanently and automatically add it please....thanks

    Hi,
    You can change the column position in interactive report as well. Once you login to your work space, run the report page. In the control when down arrow, click on select columns. Now you can re-arrange the columns as you like using up and down arrows. You can also move the column to DO NOT DISPLAY section if you want to hide any column in default view. Now click on apply.
    Review the report now if it displays correctly then click on the down arrow the control wheel and click on save report. From the dropdown list in the Save field, select "As default report settings". This will save the report for default view.
    It should always display same when you open this report page.
    Hope this helps.
    Regards,
    Tajuddin
    Web://tajuddin.whitepagesbd.com

  • How to add a new column (Project Number) in the action items table under NPD Module?

    There are two projects with same name and created by same person in NPD.
    So when it is displayed in "Action Items" table, It looks similar.
    To avoid this, I need one more column (Project Number) to be added in the "Action Items" table and " Strategic briefs and projects" table.
    So, How to add a new column (Project Number) in the "Action Items" table and " Strategic briefs and projects" table under NPD Module?
    Please do the needful.

    There is no out of the box configuration available to add columns to NPD action items.   As always we welcome enhancement requests. 
    Thanks
    Kelly

  • How to add an unique column to an existing table?

    How to add an unique column to an existing table?
    I have a large table which has no unique constraint. and I want to add an unique column for it. How to do it?
    Does adding a sequence is a good choice? How to do it?
    Thank you

    Hi,
    alter table tablename
    add constraint contraint_name unique (columnname);but before that you need to check in the table.column there is no duplicate record exist.
    Does adding a sequence is a good choice?
    Your talking about unique constraint then yes.
    Regards,
    Taj

  • How to add the Assignment column on this post outgoing payment in f-53

    Hi all,
    how to add the Assignment column on this post outgoing payment in f-53?
    thanks.
    Joo

    Hi ,
    If you want to see the assignment column in f-53 process open item screen
    1. First in O7V3 check for t.code FBz2 which line layout ( 2 digit code is assigned)
    2. Then in t.code O7z4s check in the line layout and if assignment field is not there then insert the field.
    then check in F-53.
    Hopw it will solve your problem.
    Assign points if useful
    Regards
    Prabhat

  • How to add one date column and charecter column

    hi all,
    i have 3 column start_date(date),end_date( date),duration (varchar2)
    i am trying to add start_time and duration like this
    end_date := to_char(start_time) + duration;
    but its showing value_error
    how to add one date column and charecter column.
    Thanks

    you need something that does:
    end_date (DATE) := start_date (DATE) + <number of
    days> (NUMBER)Not necessarily, because if the duration is just a string representation of a number then it will be implicitly converted to a number and not cause an error
    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select to_date('01/07/2007','DD/MM/YYYY') as start_dt, '3' as duration_days from dual)
      2  -- END OF TEST DATA
      3  select start_dt + duration_days
      4* from t
    SQL> /
    START_DT+
    04-JUL-07

  • How to add a new column to specific position

    Hi,
    How to add a new column to specified position in a existing table.
    I have using the oracle database 10g.
    This below code is not working in oracle 10 g
    example:
    ALTER TABLE EMPLOYEE ADD DEPT NUMBER FIRST:
    ALTER TABLE EMPLOYEE ADD DEPT NUMBER AFTER JOB:
    Please provide the correct syntax.

    Hi,
    When you add a column to the existing table, the column added i.e., for ex updatedon appers in the last. If you want the columns to be
    displayed in Specific order. Just give the column names in the SELECT.. statement.
    For your Information, But it is not good in Table design. Just to give something useful.
    If you want to add a column at a specified position,
    Rename the position column to the new column name
    For Ex: (OLD_COLUMN_NAME-Hiredate)
    ALTER TABLE EMP RENAME COLUMN OLD_COLUMN_NAME TO TEMP_HIREDATE;Add a New Column to Table
    ALTER TABLE EMP ADD LAST_DATE DATE;Then, Alter the Table to rename the new column that is added.
    ALTER TABLE EMP RENAME COLUMN LAST_DATE TO OLD_COLUMN_NAME;And, Rename TEMP_HIREDATE to your actual collumn.
    ALTER TABLE EMP RENAME COLUMN TEMP_HIREDATE TO LAST_DATE;In practise, this won't be a good approach but you can get something useful about renaming the
    column atleast.
    Thanks,
    Shankar

  • How to add few more columns in UWL screen

    Hi all
    Currently by default we are able to see the columns in UWL header as "Subject", "From", "Sent Date" , "Due Date" , "Status" .
    now i want to add few more columns  apart from standard columns.
    can you please let me know how to add our own columns in UWL header ??  if it is XML changes then pls let me know which xml file exactly we need to change??
    Thanks
    Sunil

    Hi Harini
    actually Standard XML file is not necessary for changing the column names in the UWL .
    we can use otherway as follows.
    go to system admin->UWL administration->click to configure item types and custom views using a wizard then it will take you to another screen -> select the radio button "Customize the look of the UWL main page" click on next then you can select what ever task item you want to change and click on the button respective button at the right end then it will take you to new screen there i added new columns  what ever required and saved also but the same one is not reflecting in UWL....
    can you please check the same in ur machine and let me know if any other things are required to be done and why this not been done our requirement??
    Regards
    Sunil

  • How to add new text field in standard report

    how to add new text field in standard report?

    Hi,
    I presume you are talking about a report display in ALV and u wish to add a column to it .
    If it is a global requirement ,as in table being used there in ALV can be modified, then you can append the table and the system should pick up the same automatically from there.
    Otherwise , you can make a Z program . Modify the catalog being used in ALV.
    Regards,
    Shweta

  • Howto use formula columns in matrix reports

    Hello
    How can i use a formula column in matrix report whose function would be
    Formula_Column_Result=A-B where A=Cell A
    B =Cell B
    Regards
    Fahad

    Hii guys
    I solved my problem on my own.
    i wrote
    SELECT * FROM EMP WHERE EMP.DEPTNO=P_DEPT_NO
    and it worked.
    Thanks guys..i luv this forum
    Regards
    Fahad Hameed

  • How to add/create additional page in Crystal Report Layout SAP B1

    Hi,
    I wanna ask about How to add/create additional page in Crystal Report Layout SAP B1 ?
    I want when user print Purchase Order then on last page also print some page like Penalty Clause etc.
    Pls help me to find the solution.
    Br,
    Thomas Marsetyo

    Hi,
    In your report footer, set it to create a new page before it is printed (In 'Section Expert', select the Report Footer -> 'Paging' tab -> Check 'New Page Before' checkbox). Throw your Terms & Conditions into the Report Footer section.
    If you already have a Report Footer that you want to keep, just split the footer into two sections (Right-click the Report Footer section -> 'Insert Section Below') and follow the same procedure for the newly created section.
         Check this Link
    http://stackoverflow.com/questions/9232239/adding-an-additional-page-to-end-of-a-crystal-report
    http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=18960
    Regards,
    Manish

  • How to add the double headings in Alv Report.

    Hi All,
    Plz suggest me how to add the double headings in ALv Report.
    Ram

    Hi,
    Try out this program....
    REPORT  ypm_historycard_rep.
    TYPE-POOLS : slis.
    DATA : it_cbm TYPE STANDARD TABLE OF mara.
    DATA : it_layout TYPE STANDARD TABLE OF slis_layout_alv WITH HEADER LINE,
           wa_fcat TYPE slis_fieldcat_alv,
           it_fcat TYPE slis_t_fieldcat_alv.
    START-OF-SELECTION.
      SELECT  *
      FROM  mara
      INTO CORRESPONDING FIELDS OF TABLE  it_cbm
      where matnr = 'D80K7'.
    END-OF-SELECTION.
      it_layout-zebra = 'X'.
      it_layout-colwidth_optimize = 'X'.
      it_layout-f2code = '&ETA'.
      APPEND it_layout.
      DEFINE macro4fcat.
        wa_fcat-col_pos = &1.
        wa_fcat-fieldname = &2.
        wa_fcat-tabname = &3.
        wa_fcat-seltext_l = &4.
        append wa_fcat to it_fcat.
        clear wa_fcat.
      END-OF-DEFINITION.
      macro4fcat    '1'  'MATNR'         'IT_CBM'   'MATERIAL NO'    .
      DESCRIBE TABLE it_cbm.
      IF sy-ucomm = '&F03'.
        MESSAGE 'hi hello good morning "press enter button" this is quiz' TYPE 'S'.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
      i_callback_program                = sy-repid
    i_callback_html_top_of_page       = 'HTML_TOP_OF_PAGE'
      is_layout                         = it_layout
      it_fieldcat                       = it_fcat
       i_save                            = 'A'
      TABLES
      t_outtab                          = it_cbm
      EXCEPTIONS
      program_error                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form  html_top_of_page
    *       text
    *      -->TOP        text
    FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
      DATA: l_text(255) TYPE c.
      DATA: text1(255)  TYPE c.
      DATA: t_header TYPE REF TO cl_dd_table_element ,
            wa_header TYPE REF TO cl_dd_table_area.
      CALL METHOD top->add_gap
        EXPORTING
          width = 10.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'hello'
        sap_style     = 'HEADING'
    CALL METHOD top->add_gap
        EXPORTING
          width = 20.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'HOW ARE YOU'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 50.
      CALL METHOD top->add_text
      EXPORTING
        text          = '____________________________________________________________'
        sap_style     = 'HEADING'.
        CALL METHOD TOP->new_line
    *      EXPORTING
    *        repeat =
        CALL METHOD top->add_gap
        EXPORTING
          width = 90.
      CALL METHOD top->add_text
      EXPORTING
        text          = 'YOU CAN TRY LIKE THIS'
        sap_style     = 'HEADING'.
    ENDFORM.                    "html_top_of_page
    Regards
    Debarshi

  • How to fix Width of column in classic report.

    Dear Friends
    i am using Apex 3.2.
    i have created Clasic Report and i have summary column in my report that column have description of issue so i want to fix width of that column nn Classic report .
    i have try some code in html expression
    <span>style="width: 480px; display: block; white-space: normal; font-size: 11px;">#ACTIVITY_SUMMARY#</span>
    {code
    after apply abovemention code that display me in my summary like this and not manage width of column.
    style="width: 480px; display: block; white-space: normal; font-size: 11px;">Dear Cherryl, Greetings !! Thank you very much for the new query and we are pleased to confirm the availability of one single cabin in all the three categories of cabin on M.V. Mahabaahu. We would like to inform you that both the departures 15th Oct 2013 & 29th Oct 2013 (Golden triangle with Cruise) are operational and attached are the prices for your kind consideration. As a special promotion for the 15th Oct 2013 departure only, we are offering USD 100 per person reduction on the Golden triangle portion combined with the cruise. Kindly review and advise us to block the accommodation accordingly. Regards...pankaj
    How to fix Width of column in classic report.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi,
    I'm working an example in APEX 4.2 so YMMV (your milage may vary!).
    For Classic Reports, where the Column Attributes "Display As" is set to Display as Text (escape special characters ...:
    1) I find that Column width and Element Width setting have no effect to make the column smaller or larger.
    2) Here is one way that works:
    - In the Region's Region Definition, under Attributes give the Static ID a name (no spaces), say, class-report.
    - In the columns you want to affect, place "&#60;div>#ENAME#</div&#62;" in the columns Column Formatting "HTML Expression". Where "ENAME" here is the actual column name.
    I'm using the EMP table as an example.
    - Finally, in the page's HTML Header put, for example
    <style>
    #classic-report td.data[headers="ENAME"] div {
      width: 200px;
      color: blue;
    #classic-report td.data[headers="JOB"] div {
      width: 50px;
      white-space: nowrap;
      word-wrap: break-word;
    </style>This makes the ENAME column wider and the JOB column smaller and wraps it.
    Much more could be said. If you tweak you will find you can also affect spacing above, below and right/left of the data.
    #classic-report .report-standard th.header {
      border-left: #9fa0a0 1px solid;
      padding: 2px 3px 4px 5px;   /* top right bottom left margins */
      font-size: 11px;
      font-weight: bold;
      vertical-align: bottom;
    #classic-report .report-standard td.data {
      border-left: #9fa0a0 1px solid;
      padding: 3px 4px 5px 6px;
      font-size: 9px;
    }Does this help?
    Howard

  • OBIEE 11g How to Exclude/Include Multiple columns on BI Report at Run Time

    OBIEE 11g How to Exclude/Include Multiple columns on BI Report at Run Time

    Exclude:
    you Can exclude columns in either Table view or pivot table view by placing those columns in Excluded section but you will notice that it will appear in bi server parsed sql query.
    Not sure you were asking about runtime??
    would you please explain your question!!
    Thanks
    NK
    Edited by: DNK on May 8, 2013 9:48 PM

Maybe you are looking for