Displaying a value derived in a report

In my application, I have a derived value called a tax, which is calculated with a formula that uses the values of the other 3 columns in one of my paintings.
Is it possible to create interactive report based on this table that displays the value derived in the form of column (as well as other columns that should be displayed)?
I don't know how this is possible, given the fact that a report is based simply on a query on the base table. I have to find a way to perform the procedures that are used to calculate the value derived for each line that displays the report. This can be done?

Hi Prohan,

You can include the column "fees" directly in your SQL statement. Something like (using the EMP table for example):

SELECT EMPNO,
ENAME,
NVL(SAL,0) SAL,
NVL(COMM,0) COMM,
NVL(SAL,0) + NVL(COMM,0) TOTAL_PAY
FROM EMP

or

SELECT EMPNO,
ENAME,
NVL(SAL,0) SAL,
NVL(COMM,0) COMM,
MyFunction(NVL(COMM,0), NVL(SAL,0)) TOTAL_PAY
FROM EMP

Andy

Tags: Database

Similar Questions

  • Display a value or another on reports 6i

    Hello world
    I made a report using reports 6i and I have a field where I would like to display a value of any of my 2 formulas I created, but if one of my formulas brings an empty value, then I want this field to display the value of my alternative, but if the two have a value not empty so I want to show that I want.
    For example:
    I have a field named credit in my layout and I have 2 formula named columns: Formula1 and Formula2. If Formula1 is empty so I want show Formula2, but if the two are not empty, so I want to just display formula1.
    This is the code I use in formula 1:
    function CREDITOSFormula return Number is
    RETURN NUMBER(10,2);
    begin
      DECLARE
           t_credQ1 NUMBER(10,2);
           CURSOR c_credQ1 IS
           SELECT SUM(CREDIT_VALUE)
           FROM TABLE1 A, TABLE2 B
           WHERE A.SCHOOL_ID =:SCHOOL  AND
           A.CREDIT_STATUS = :STATUS AND
            B.STUDENT_ID = :STUDENT AND
            B.PERIOD = :SCHOOL_YEAR AND
            B.GRADE_Q1 IS NOT NULL AND
           A.CLASS_ID = B.CLASS_ID AND
           A.SCHOOL_ID = B.SCHOOL_ID;
      BEGIN
           OPEN c_credQ1;
           FETCH c_credQ1 INTO t_credQ1;
           IF c_credQ1%FOUND THEN
                CLOSE c_credQ1;
                :PLACE_CREDQ1 := t_credQ1;
           ELSE
                CLOSE c_credQ1;
           END IF;
           RETURN t_credQ1;
      END;
    end;
    This is the code that I use for Formula2:
    function CF_1Formula return Number is
    RETURN NUMBER(10,2);
    begin
      DECLARE
           t_credQ2 NUMBER(10,2);
           CURSOR c_credQ2 IS
           SELECT SUM(CREDIT_VALUE)
           FROM TABLE1 A, TABLE2 B
           WHERE A.SCHOOL_ID =:SCHOOL  AND
           A.CREDIT_STATUS = :STATUS AND
            B.STUDENT_ID = :STUDENT AND
            B.PERIOD = :SCHOOL_YEAR AND
            B.GRADE_Q2 IS NOT NULL AND
           A.CLASS_ID = B.CLASS_ID AND
           A.SCHOOL_ID = B.SCHOOL_ID;
      BEGIN
           OPEN c_credQ2;
           FETCH c_credQ2 INTO t_credQ2;
           IF c_credQ2%FOUND THEN
                CLOSE c_credQ2;
                :PLACE_CREDQ2 := t_credQ2;
           ELSE
                CLOSE c_credQ2;
           END IF;
           RETURN t_credQ2;
      END;
    end;

    user626836 wrote:
    Hi Pradhyumn and thanks for your reply,
    Is it possible to use only a single domain where I can show just two values? For example:
    If the value of: CREDITOS is null, and then view the value of: CF_1 or if the value of: CF_1 is set to null, and then view the value of: CREDITOS
    Is this possible to do?

    You can anyway.
    1. create two ranked in the same position where is the first source of field: CREDITOS and the second is: CF_1
    2. Select filed and press F11 to go the code editor for the classified: CREDITOS

    To write

    if :CREDITOS > 0 then
     return (true);
    else
    return (false);
    end if;
    

    Ditto for: CF_1.

    I hope this works...

    Hamid

  • Initial value for the interactive report

    I have an interactive report that has a where clause condition clause: where =(:P50_employeeName) used.

    (: P50_employeeName) is a a list of selection without value null. When the page loads the selection list displays the value employee1, but the interactive report is empty. It's not until I select another value within the selection list becoems active report. How I can so when page loading the interactive report shows instead of being blank? I can't the values of hard employee-coding as each user can see only the user in their Department.

    Hello

    Since I don't know all your table structure, it was just a quick sampling of the approach.

    I guess that your LOV would have the correct where clause to control its content, and you can add additional conditions to the IR where clause as well.

    Here is an example of one of my IR where clauses

    the case when: P200_DEPARTMENT = 0 then 1

    When: P200_DEPARTMENT <> 0 and: P200_CREW = 0 and: P200_DEPARTMENT = c.crewdeptkey, 1

    When: P200_DEPARTMENT <> 0 and: P200_CREW | " <> 0 and: P200_CREW = c.crewkey, 1

    end if 0 = 1

    Kind regards
    Brad

  • To display the value in link clickable e-mail?

    Hello world

    I create a small application that is more a tool to track applications and databases, and includes contact information on who is responsible for what.

    I have an area where you can see name, e-mail, phone, etc. as display value only (since it seems better than having a text box displays this value), but it would be great if the e-mail is displayed in this area could be made clickable as an e-mail link. Is this possible? I know it can be done with the regions to report, but I want to do not use parts of report here.

    Someone has an idea?

    Sincerely
    Johnny

    Hello
    Try this.
    1 edit the Page item (view only as you said)
    2. in the element - text element Pre out this

     -- there must be a double quote before greater than symbol
    {code}
    3. In Post Element Text put
     {code}
     
     {code}
    
    That should do it.
    
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    
  • Display prompt then navigate to another report

    Hello

    I have a first report that display values. When I click on the value I navigate to another report. I have a problem. When the second report is open, guests are not display so my second report is too long and irrelevant.

    Can you help me to find a way to do it. The best would be to show the second report, based on the value of the first report. (the value of the first report is considered to be a command prompt).

    Kind regards

    When you create the second report, you want to create a filter on the column with the value "is invited". Then when the user navigates on the second report, it will be filtered according to the value that drill down on a user.

    For example, if the user explores the activity Id, the second report would have a filter on the activity Id and the operator is set to "Is invited".

    Good luck
    Thom

  • Read integer values to worksheet and display the values in a table

    Hi all

    I have integer values to read from a worksheet and display them in a table. I uses 'Reading of the spreadsheet file' mode 'integer '. I want to display these values in a table. The problem is the table takes only 2d-array of string as input but not an integer.

    It works fine if I change 'Worksheet file playback' mode to 'integer' to 'chain', but I want to read integers and must use integer values for calculations more. Please give suggestions on the display of integers to a table.

    Thank you.

    Do not take not piece-by-piece just convert as a whole. See the attached example

    Good luck

  • Display the values in a list in a certain way

    Hello

    I'm looking for a way to display the values in a list by the first value by a slash and the rest with an indentation.

    In other words in this way:

    /value

    Value1

    value2

    value3

    etc...

    Please see the attachment for a better reference where data are received and then filled to the window list.

    Thanks for your comments

    Thanks guys,.

    I endend up doing this:

    If (i == 0)
    {
    sprintf (current_log_view, "/ %s", cnfg_display_db [i] "");
    }
    on the other
    {
    sprintf (current_log_view, "%s", cnfg_display_db [i]);
    }
    SetCtrlVal (log_panel, LOG_LOG_TB, cnfg_display_db [i]);
                            
                            
    InsertListItem (dir_list_panel, DIR_LIST_RETR_LIST, current_log_view, i, 0);

    and it works very well!

    Thanks again

  • Displays the value of double type

    Hi - another crazy me today. With the help of v % of the SDK. Memorization of the GPS coordinates in a persistent storage which is fine. So want to show these results on a screen by updating a labelField with the value.

    the code below, printLn myTest displays a value of something as 42.1234 gets so thin value. However, with the code so I get Double.toString (myTest) cann't find symbol even though I java.lang. *; imported. If I remove this line of double.toString then it will compile, but throws an exception error when I try to display on the screen. Can someone help a newbie pls...

    If (persistentHashtable.containsKey ("LVFLat")) {}
    Double myTest is (Double) persistentHashtable.get ("LVFLat");.
    System.out.println ("# latitude =" + myTest);
    String finalLat = Double.toString (myTest);
    displayLVFLat.setText (myTest);
        
    }

    You must read the documentation of the API and note the use of capital letters and tiny.  Capitals: the object, tiny, primitive.  Read the API done again and see what I mean.

    You want to replace this:

    String finalLat = Double.toString (myTest);

    with

    String finalLat = myTest.toString ();

  • How to display a value of transitional attribute to column db entity column?

    Mr President

    Help me at the time 12.2.1 jdev.

    How to display a value of transitional attribute to column db entity column?

    I have the requirement to indicate a value of transitional attribute column in the column db entity for some reason any.

    Any body can help as my show in the picture below

    The StAmt is a transitional column and a column db of the entity.

    tworows.png

    Any body can help please. !

    Concerning

    This means that the amount to be the attribute will always has the same value of the transient attribute? If so, why do you want the amount attribute the transient attribute is sufficient?

    Anyway, if you want to get attribute data in attribute transitional amounts you can open class ViewRowImpl and appearing in the getter or amount, you can get the value in the transitional as attribute:

      public Number getAmount()
      {
        return getTransientAttribute();
        //return (Number) getAttributeInternal(AMOUNT);
      }
    

    in this case, the quantity data store database will not appear on the table it will still get the transitional attribute data and it's meaningless.

  • Selection list refresh / 'display additional values '.

    I'm refreshing a list of selection with dynamic action and then after with dynamic action to set the value to the max value.  The problem is that it assigns the first item in the list.  Seems to act as the game happens before the update is completed.  I have the option "display additional values" but I can't find a way to set the value of a dynamic action - it does not accept the additional value.  This should work?

    It's not a bug, discounting is a reminder of the AJAX and success raises an apexafterrefresh event.

    You can add a second dynamic action for the selection list:

    Event: after refresh

    Selection type: point

    And then the new value must be available.

    The display of the values additional option has another purpose. Explained in the help text to the Apex 5.

    Display additional values

    An element can have a value of session state that does not occur in the given list of values definition. Specify if this list of values this additional session state value. If you choose not to display this additional session state value and there is no matching values in the list of values, the first value in the list of values is the value selected and displayed.

  • Can a dynamic action of type 'alert' display a value of field without javascript?

    Hello

    can a dynamic action of type 'alert' display a value of field without javascript ( alert ( $x (P '200_OP').value)); ?

    What should I write in the 'text' section to display in the alert, the value of P200_OP for example?

    Gianpaolo cordially

    Hi gianpagi,

    gianpagi wrote:

    I know that with "run JavaScript Code" works. My question is about action as 'alert '.

    Dynamic action "Alert" is expected to this only the string to display in the alert. May not be able to access the current value set in a page element.

    Therefore, "Run the Code JavaScript" only works in this case where your can integrate the current values of the DOM html elements

    If you notice that da 'Alert' request 'Text' and 'Execute JavaScript Code' DA 'Code' request to be executed.

    Kind regards

    Kiran

  • How to set the value derived in the bean messagechoice

    Hello

    I have a requirement to set the value derived in messagechoice.

    Need help in this

    Kind regards

    Kalai

    Good answer:

    String stmt =

    "Start: 1: = xxcust_eam_oaf_extensions.get_wo_priority(:2,:3,:4); end; « ;

    CallableStatement cs = txn.createCallableStatement (stmt, 1);

    try {}

    cs.registerOutParameter (1, Types.VARCHAR);

    cs.setString (2, OrganizationId);

    cs.setString(3,RequestNumber);

    cs.setString (4, consequences);

    CS. Execute();

    Priority string = cs.getString (1);

    pageContext.putDialogMessage (new OAException ("priority value:" + priority));

    If (priority! = null) {}

    pageContext.putDialogMessage (new OAException ("inside the loop if"));

    String query = "select lookup_code from the mfg_lookups where lookup_type ="WIP_EAM_ACTIVITY_PRIORITY"' and sense =: 1 ';"

    PreparedStatement stmt1 = conn.prepareStatement (query);

    stmt1. SetString(1,Priority);

    ResultSet resultset = stmt1.executeQuery ();

    If (resultset! = null) {}

    While (resultset.next ()) {}

    If (resultset.getString (1)! = null) {}

    String lookupcode = resultset.getString (1); here for the extraction of the column in the query

    OAMessageChoiceBean xxPriority = (OAMessageChoiceBean) webBean.findChildRecursive ("Priority");

    xxPriority.setValue (pageContext, lookupcode);

    }

    }

    }

    }

    }

    {} catch (SQLException e1)

    throw new OAException (e1.getMessage (), OAException.ERROR);

    }

  • How to display the value of the variable for bottom of pl/sql

    How to display the value of the variable for bottom of pl/sql

    declare

    V_1 number: = 10;

    V_2 number: = 20;

    V_3 number: = 30;

    v_4 number: = 40;

    v_5 number: = 50;

    test varchar2 (100);

    Start

    I'm in 1.5

    loop

    test: = "v_" | I have;

    dbms_output.put_line(i||) e > ' | test);

    end loop;

    end;

    /

    How to get below output:

    1 > v_1

    2 > v_2

    3 > v_3

    4 > v_4

    5 > v_5

    But I want to output of

    1 > 10

    2 > 20

    3 > 30

    4 > 40

    5 > 50

    Hello

    You cannot reference variables as you did and get the value of the variable. Use pretty collection.

    set serveroutput on size 2000
    declare
      type      number_table is table of number;
      numbers   number_table := number_table(10, 20, 30, 40, 50);
    begin
      for i in numbers.first .. numbers.last
      loop
        dbms_output.put_line(i || '->' || numbers(i));
      end loop;
    end;
    /
    
    anonymous block completed
    1->10
    2->20
    3->30
    4->40
    5->50
    

    See the Collections of PL/SQL and Records http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#LNPLS005

  • Unable to display the results of a detailed report or the results of a questionnaire which is inbedded in the project.  I checked the preferences of quiz and enabled for the draft declaration.  I use SCORM 1.2.  My LMS is not listed (MCN) and so I chose '

    Unable to display the results of a detailed report or the results of a questionnaire in a bed within the project.  I checked the preferences of quiz and enabled for the draft declaration.  I use SCORM 1.2.  My LMS is not listed (MCN) and so I chose 'other LMS standard.  Any ideas on why I see the results?

    Publish your SCORM SCORM Cloud and test if it will show you the results you want.  If so, then your problem is with your LMS.  If this is not your problem may be due to something in the settings of your current project.  Eliminate one thing at a time.

  • Setting: display all values currently available - disabled

    Hello

    I want to show the value of parameter of an another table/folder.

    Such as:

    I created a spreadsheet of the EMP and DEPT/Table of records:

    SELECT E.Emp_Name, D.Dept_Name

    FROM Emp E, Dept. D

    WHERE E.Dept_ID = D.Dept_ID

    Question:

    1. How can I view Dept_ID (s) available in the EMP Table as an input parameter?
    2. If I can show Dept_Name to select between but Dept_ID and take as an input parameter?

    When I try to create the D.Dept_ID parameter 'Display all values currently available' option shows disabled and cannot be selected.

    Help, please.

    Thanks in advance.

    Manny

    I found the answer: How to insert the list of values (LOV) in Discoverer Desktop

    Thank you

Maybe you are looking for