Calcualting the formula column total.

Hi All,
I am very new to bi publisher..I have a requirement where i need to find the total of the formula column..how can i achieve this?
and also i need to find the total of balance group by month..here is the sample output what i need.Please help its urgent
Date Amount CalcAmount Balance
1-jun-2010 100 150 200
3-jun-2010 50 50 300
5-aug-2010 100 50 200
6-aug-2010 300 60 400
310
Jun:500 Aug:600
How to achive this....where calcamount field is not coming from any input file..this i did manually in rtf template..
Please help is urgent
Thanks in Advance
Bharat

Hi Ananth,
i tried with this..Now the calculated column value its showing as NaN.
my requiremnt is thr is one form value called OPC(reguler text) and the logic inside is <?xdofx:if APPLIED>AMT then to_number(APPLIED- AMT) else 0 ?>
and as per yous solution i have created one form value below to that i wrote the logic like this <?xdoxslt:set_variable($_XDOCTX,'var', xdoxslt:get_variable($_XDOCTX,'var‘)+ OPC)?>
and in the total column i have created one more form value and wrote this code <?xdoxslt:get_variable($_XDOCTX, 'var')?>
so now the total is coming as NaN.
Please help.
Thanks
Bharat

Similar Messages

  • Applying order by for the data comming from the formula column

    Dear Friends,
    I am having a report in which some of the columns in which data is comming from the formula columns,but i need the data in asc order.
    How can i do it.
    Please advice.

    I am having a report in which some of the columns in
    which data is coming from the formula columns,but i
    need the data in asc order.Lets say you have this query:
    select empno, sal, comm from emp
    And you have empno, sal, comm and a formula column 'f_percentage' in one group. Add one dummy column in the query, like this:
    select 'temp' temp, empno, sal, comm from emp
    Move this 'temp' column into the second group (drag and drop outside the first group). You don't have to create repeating frame/or need to show this 'temp' column on the report.
    Now if you use break order on formula column, that should work. Make sure you have break order on other columns also. Arrange items (change order) in data model as you needed. Run your report before and after this change and make sure you have same number of rows before and after this change.
    (from reports builder's help)
    "Break Order has no effect on columns that belong to the lowest group of a particular query. Break Order only affects columns in groups that are above the lowest child group of a query"

  • Why is the formula column returning garbage?

    I've set up a query that performs a full outer join on two tables, returning one field from each table. Each of these fields is created by concatenating several other fields from that table, i.e.
    Select a.field1 || a.field2 fielda, b.field3 || b.field4 fieldb from tablea full outer join tableb
    on a.field5 = b.field5
    where (a.field5 = :value or b.field5 = :value)
    For any :value one or more records exists in either tablea, tableb, or neither-but never in both. This works fine in SQL*Plus, returning values in fielda, fieldb, or neither-but never in both, just as it should.
    I then set up a formula column in the Group for the query, returning either fielda, fieldb, or an empty string depending on :value, i.e. If :value = 'A' then return (:fielda); ElsIf :value = 'B'; then return (:fieldb); Else return (''); End If;
    In the layout I set up a repeating frame sourced to the Group, and in the frame I put a field sourced to the formula column. But the field is displaying garbage. Any ideas why?
    Thanks.
    Edited by: user6931915 on Dec 6, 2010 1:36 PM
    OK, it's not returning garbage-it's just not returning the right data. It was appearing as garbage because the field was only large enough for 2 characters & I'd mistakenly left it set to Fixed.

    Since I'm so new to OS X Server - I have made many mistakes with it in my home learning environment - and therefore learned quickly to make image backups every step of the way - so restoring to v2.1 was very quick and simple.
    I also wanted to point out - this problem is not limited to the main screen of the Wiki.  If you disable the Wiki - but leave the default website enabled - the default website will display - but if you click on the change password link - it should pop up an enter user id, old password new password window and should also automatically switch to a trusted ssl connection - assuming you have a trusted certificate correctly configured.  This functionality works fine in Safari, Firefox and Chrome - but the same behavior occurs on the password change screen in IE9 as it does in the Wiki.
    I am now looking into submitting this to bugreport.apple.com.  I will report back after I do that.
    ~Scott

  • Forms won't do order by after the formula columns or constants in union all

    i have a big select as :
    select * from
    ( select .....,id doc_id, '1' op from .....
    union all
    select ......., id doc_id, '2' op from .....
    union all
    select ......., id doc_id, '3' op from .....
    ) order by id, op
    where i can have the same id for a number x >1 rows with diffrent values for op.
    lets say 5 rows with values id plus 1,2,1,2,3 for op.
    In a program unit i have a cursor with this select and i fetch every row and write them in a text file type .csv.
    The problems are :
    1) it won't do the order by after op ,
    i say order by id, op but the result is only ordered after id
    ... id op
    ... 1 2
    ... 1 1
    .... 1 2
    2)
    if i modify the select like this :
    select ...., id, op from ---i put the aliases here instead of *
    ( select .....,id doc_id, '1' op from .....
    union all
    select ......., id doc_id, '2' op from .....
    union all
    select ......., id doc_id, '3' op from .....
    ) order by id, op
    in the csv the column op in empty , so i only get the id information
    ... id op
    ... 1
    ... 1
    .... 2
    Any idea ?
    Oh and my screen goes white , the form block sometimes when i have a "difficult "
    select but after a while i get the result i wanted (message or csv file)

    select * from
    ( select .....,id doc_id, '1' op from .....
    union all
    select ......., id doc_id, '2' op from .....
    union all
    select ......., id doc_id, '3' op from .....
    ) order by id, op
    The problems are :
    1) it won't do the order by after op ,
    i say order by id, op but the result is only ordered after id
    select * from
    ( select .....,id doc_id, '1' op from .....
    union all
    select ......., id doc_id, '2' op from .....
    union all
    select ......., id doc_id, '3' op from .....
    ) order by 3,4
    if[u] id is 3 column positions, and '1' op is 4 column positions in UNION-SELECT
    Hope this helps

  • Using the 'LOG' Function in a Formula Column

    If I write the following SQL statement at the SQL prompt, it works :
    SELECT LOG(sal,10) FROM emp ; But, if I write a similar statement in the formula column of a report, then it does not work :
    SELECT LOG(sal,10)
    INTO x_variable
    FROM emp
    WHERE empno = :empno ;
    return (TRUE) ;
    It would be great if someone can help.

    Try This..
    In the formula columns pl/sql place the following:
    function cf_1Formula return number is
    num number;
    begin
    num := log(sal, 10);
    return ( num );
    end;
    -- cf_1 is the formula col name
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    If I write the following SQL statement at the SQL prompt, it works :
    SELECT LOG(sal,10) FROM emp ; But, if I write a similar statement in the formula column of a report, then it does not work :
    SELECT LOG(sal,10)
    INTO x_variable
    FROM emp
    WHERE empno = :empno ;
    return (TRUE) ;
    It would be great if someone can help. <HR></BLOCKQUOTE>
    null

  • Navigation on row and column total in pivot report

    Hi All,
    I have created a pivot report with 2 dimension columns and one measure and defined row and column total. Now, users wants to have a navigation report on the row/column total so that once he clicks on total value, he can see the detail report. While doing this, he also wants to pass on the 2 dimension column values to detail report.
    Is there any workaround for this?
    Thanks in advance.

    use a formula column/row. use RANK function in that. (e.g. Rank([A], asc) will sort the rows based on column A values in ascending order)
    you can use this rank in your heading.
    But frankly this is not so easy. You have to do it in a very intelligent way, so that rank gives you column number/row number any how.
    Have a try and let see if you find a appropriate solution.
    Regards,
    Rahul

  • Formula Columns ?

    Hello Everyone,
    I need to know how to get the sum of two column formulas (cf_win, cf_loses) on each row and the percentage of one particular column (win %). Here is an example of how the final report should look.
    SITE WINS LOSES DECISIONS WIN %
    A 10 5 15 67%
    B 35 10 45 78%
    C 8 2 10 80%
    Totals 53 17 70 76%
    Thanks
    Richie

    Hi Richard,
    You can achieve this with summary column.
    To get the sum of formula column, put a summary column outside the query group and select the "formula column" as source and "sum" as function in property inspector.
    To calculate the % you can have a formula column again.
    Hope this helps
    Thanks
    Oracle Reports Team

  • How to add text labels to computed column totals in a banded report?

    I'm sure I'm missing something obvious here. I have a simple report with a table that consists of 3 DB field columns and 3 computed columns. I have the 'show column total' property enabled and it inserts the totals at the bottom of the computed columns. What I haven't been able to do is insert a label to the left of the computed totals. I tried inserting a blank field and adding my label, but the location is not dynamic - if one grouped item has 3 rows and the next has 4 the inserted field does not flow to the bottom of the table for each group, it displays in the same position for each group.
    What property/option am I not seeing?
    Thanks!
    Edited by: user11293154 on Jun 22, 2009 1:03 PM

    Thanks for the reply. I'm using Interactive Studio version 9.3, but can't find the 'Set Spring' feature. The help file doesn't have a reference to it. There is a Spring(method) with this example;
    ActiveDocument.Sections["Report"].Body.Tables["Table"].Spring("Chart")ActiveDocument.Sections["Report"].Body.Tables["Table"].Spring("Pivot")

  • Formula Columns are not working in Reports 10g

    Hi,
    We converted the reports developed in Reports 6i to Reports 10g. When we run the report in Reports 10g Builder everything works fine. But when we deploy the same report in Oracle Application Server and invoking the report the formula columns are not working ie., the fields/ placeholder columns which are based on the formula column are not displaying any values in the report.
    Please, someone help us in this regard.
    Thanks & Rgds,
    M T

    What version of Reports do you use..???
    Greetings...

  • 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.

  • Formula Column in Report 9i Builder

    Hi,
    I use this configuration
    Report Builder 9.2.0.1.0
    Windows XP Service Pack 1
    NLS_LANG "BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1"
    When I try to create a formula column that returns number, I have to choose datatype 'Nu'mero' (with accented u)as this is the only avaiable in the combo box. However when I write this PL/SQL code for the column:
    function CF_17Formula return Number is
    begin
    RETURN(1);
    end;
    Reports gives me the message:
    REP-0737: Deve ser uma funcao com retorno do tipo 'nu'mero'.
    In English this message could be
    REP-0737: Should be a function with return type 'nu'mero'.
    I don't have this problem with Character or Date formula columns (these datatypes are called Caracter and Data in Portuguese).
    It seems that Reports is having problems with u' (accented u) character. If I change NLS_LANG to AMERICAN_AMERICA.WE8ISO8859P1 everything works fine because I can choose Number in the Formula Column Datatype in the Property Inspector.
    The problem is in the function declaration not in the Return statement.
    Could anyone help me? Tks.
    Edmar

    Edmar,
    You are right. I could reproduce this issue.
    I have filed a bug to fix it from the development in next patch
    Thanks
    The Oracle Reports Team

  • Function not callable in formula column..

    Hi,
    I am getting one strange problem..when i call one function in a sql statment in report builder 6i from a formula column, it gives error that this function can not be called from sql but when i run the same sql from plsql dev, it runs fine..Oracle version 9i..
    Plz help..

    Hi,
    This is the code block used in the formula column..The formula cloumn datatype is character and size is 15..
    function FML_INT_LABLEFormula return Char is
    l_int_lable varchar2(15);
    begin
    select (DBK_C_ADVICES.DBF_C_RET_ADV_TEXT(:PRM_BRCH_CODE, NVL(:PRM_PROD_CODE,' '),'R01',1)||' Rate')into l_int_lable from dual ;
    RETURN(l_int_lable);
    end;

  • Formula column equivalent in Data Template

    Hi all,
    I'm working with my first data template and fumbling my way through. I was able to generate the XML output and apply my template. I have some idea on how to burst too, but I'm stuck on how to get the current user's email address. In Oracle Reports, I could just create a formula column and get any specific information needed. How do I do the same in Data Templates?
    TIA,
    Alka

    HI,
    Can I know How can we create the formula column like if then else logic in the Data template?
    Regards
    Boopathi

  • Formula column order

    Hi All....
    Hope all had a good weekend......any way
    how can i order my results in a report using the formula column
    the problem is that i have a query which give me one column(group by) and from the column i'm linking some othe formula column ....and i want to order my report using the formula columns....
    Looking forward to hear from you guys.....
    Se ya

    hai,
    i think u r using formula column in your report.then you can give
    break order for this column in the property palete.
    bye

  • About formula column in oracle report

    I want the output value of the formula column in my report between two brackts ....ex: (28.99) ...can anyone give me the idea

    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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for