Help with math / calculations in RTF templates

Greetings,
I know that there are math capabilities in the templates... I've seen the code samples in the Core Components guide.
What this doesn't tell you is WHERE these things would go in a template. And... that... is my question.
We are just starting to use BIP in conjunction with JDE EnterpriseOne (8.12, tool set 8.97.12). For our first attempt we're creating our template over a new report.
I have a template where I sum two different repeating values (through the normal BI Properties) and place these values in two separate cells in a table. I want to sum the two of these together for a "grand" total.
I've seen the "examples" but they really aren't very helpful. The xsfo, etc. for doing addition is fine, but WHAT are the values to add and WHERE does the code go?
If anyone has done something like this or has experience using the embedded code I would appreciate hearing from you.
Thanks in advance

I see what you are saying about the spaces... but it made no difference... still got the error.
The XML file is too large and convoluted to be pasted here.
With reqards to the following snippet:
COLA = <?sum(current-group()/COLA)?>
COLB = <?sum(current-group()/COLB)?>
Summ== <?sum(current-group()/COLA) + sum(current-group()/COLB)?>
Where does THIS code go?
Here is the error detail:
ConfFile: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config\xdoconfig.xml
Font Dir: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
Run XDO Start
Template: C:\Documents and Settings\jdenison\My Documents\BIP Templates\R5642001\R5642001_TEMPLsave.rtf
RTFProcessor setLocale: en-us
FOProcessor setData: C:\Documents and Settings\jdenison\My Documents\BIP Templates\R5642001\R5642001_RICE0001_D081029_T144059683.xml
FOProcessor setLocale: en-us
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(Unknown Source)
     at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
     at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
     at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
     at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
     at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
     at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
     at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
     at RTF2PDF.runRTFto(RTF2PDF.java:629)
     at RTF2PDF.runXDO(RTF2PDF.java:439)
     at RTF2PDF.main(RTF2PDF.java:289)
Caused by: oracle.xdo.parser.v2.XPathException: Extension function error: Method not found 'sum'
     at oracle.xdo.parser.v2.XSLStylesheet.flushErrors(XSLStylesheet.java:1534)
     at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:521)
     at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:489)
     at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:271)
     at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:155)
     at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:192)
     ... 15 more

Similar Messages

  • Need help with 'division' operation in RTF template

    We are using variables in RTF template to perform all data manipulations
    To calculate columns where we need to do division operation, using ‘/’ or ‘DIV’ is not working.
    Using <?xdofx: op1 DIV op2?> is working only when op1 and op2 are numbers like ex. <?xdofx: 100 DIV 50?> returns result 2.
    But the same tag used for columns or variables is not working.
    For ex.
    <?xdofx: (xdoxslt:get_variable($_XDOCTX, 'var1')) DIV xdoxslt:get_variable($_XDOCTX, 'var2') ?> is not returning any result, though
    <?xdoxslt:get_variable($_XDOCTX, ‘var1’)?>
    <?xdoxslt:get_variable($_XDOCTX, ‘var2’)?>
    both are returning values stand alone.

    On Thu, 03 Jan 2008 00:22:31 -0500, Alan
    <[email protected]> wrote:
    >yes, the use of child page comments in a template file is
    probably the
    >problem. But if that is solved, having two editable
    regions with the same
    >name will cause problems.
    >
    >short version- things be horked big time.
    <chuckle /> Methinks you're right. It looks like the
    copy/paste monster
    has been munching on it. One guess to fix it would be to open
    it in a
    text editor and change this:
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    <!-- InstanceBeginEditable name="head" -->
    To this:
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    And change this:
    <!-- InstanceEndEditable --></head>
    To this:
    </head>
    Gary

  • Help with customizing chart in rtf template

    Since the MS Word plugin doesn't support stock_hilo_close type charts, I'm trying to create one by hand (by looking at the schema). I'm having trouble
    a) getting the chart to show the HI, LO and CLOSE marker values. The xsd only talks about how to display the CLOSE marker text, not the HI and LOW.
    b) (given enough time, I think I can figure this out) formatting the xml to show the right data. My xml source looks like this:
    <ROWSET>
    <ROW>
    <MONTH>Jun-07</MONTH>
    <LOW>1</LOW>
    <HIGH>15.9</HIGH>
    <CLOSE>5.5</CLOSE>
    </ROW>
    <ROW>
    <MONTH>Jul-07</MONTH>
    <LOW>2</LOW>
    <HIGH>12.4</HIGH>
    <CLOSE>6.5</CLOSE>
    </ROW>
    </ROWSET>Can someone show me what the <DataValues> element must look like for this structure?

    Since the MS Word plugin doesn't support stock_hilo_close type charts, I'm trying to create one by hand (by looking at the schema). I'm having trouble
    a) getting the chart to show the HI, LO and CLOSE marker values. The xsd only talks about how to display the CLOSE marker text, not the HI and LOW.
    b) (given enough time, I think I can figure this out) formatting the xml to show the right data. My xml source looks like this:
    <ROWSET>
    <ROW>
    <MONTH>Jun-07</MONTH>
    <LOW>1</LOW>
    <HIGH>15.9</HIGH>
    <CLOSE>5.5</CLOSE>
    </ROW>
    <ROW>
    <MONTH>Jul-07</MONTH>
    <LOW>2</LOW>
    <HIGH>12.4</HIGH>
    <CLOSE>6.5</CLOSE>
    </ROW>
    </ROWSET>Can someone show me what the <DataValues> element must look like for this structure?

  • Can we do Calculations in RTF Template

    Hi Friends
    Can we do calculations in RTF template with the fields existing in the XML code.
    Say there are 2 fields CF_TAX1 and CF_TAX2, can we do calculations with them to give output in a cell in a table in the RTF template for eg:
    (CF_TAX1)/(1+CF_TAX2)
    What will be the exact syntax of the above to be used in RTF Template.
    Regards
    Ray

    All kind of calculations can be done, you can also use varibale and store the values and print it in differnt cell

  • Calculations in RTF Template

    Hi All,
    I am new to BI Publisher and I am trying to create a template that will calculate growth for various fields.
    The data is split like (ignore # - using to show structure of XML):
    <YTDKPI>
    ###<YTDKPI_ROW>
    ######<FIELD 1>(Val)</FIELD 1>
    ######<FIELD 2>(Val)</FIELD 2>
    ######<FIELD 3>(Val)</FIELD 3>
    ###</YTDKPI_ROW>
    ###<YTDKPI_ROW>
    ######<FIELD 1>(Val)</FIELD 1>
    ######<FIELD 2>(Val)</FIELD 2>
    ######<FIELD 3>(Val)</FIELD 3>
    ###</YTDKPI_ROW>
    </YTDKPI>
    There are two <YTDKPI_ROW>, one for 2009, one for 2008.
    Within the template, I would like to calculate the growth year on year for each of the fields.
    My template so far looks like (again ignore #):
    |## KPI ###|##<?for-each-group@column:YTDKPI;./YEAR?>#####<?YEAR?><?end for-each-group?>##|
    |## YEAR ##|##<?for-each-group@column:YTDKPI_ROW;./YEAR?>#<?YEAR?><?end for-each-group?>##|
    |
    |## KPI 1 ##|##<?for-each-group@column:YTDKPI_ROW;./YEAR?><?FIELD1?><?end for-each-group?>##|
    |
    |## KPI 2 ##|##<?for-each-group@column:YTDKPI_ROW;./YEAR?><?FIELD2?><?end for-each-group?>##|
    |
    |## KPI 3 ##|##<?for-each-group@column:YTDKPI_ROW;./YEAR?><?FIELD3?><?end for-each-group?>##|
    |
    When previewed, this results in a 3 column table with the KPI's for 2008 in column 2 and the KPI's for 2009 in column 3 (names in column 1)
    If possible, I would like a 4th column to calculate the % change between 2008 and 2009.
    I would like to do this within the template as the above is a very simplified version of the actual and to have fields within the data for each of the growths would not be the preferred method.
    From the above I hope I have communicated exactly what I need!
    I think the problem I face is in specifying a particular row number within the data to perform a calculation?
    I may have started off completely wrong, so any advice would be useful.
    Please Help!
    Many Thanks
    note: the data is generated via an Answers report and the template has been created as an RTF template using Word 2007.

    Hi Vetsrini,
    That didn't work either. I think we need to take a step back to ensure I have not missed something.
    Please see below for a sample xml and the code from word:
    <DATA>
    <YTDKPI>
    <YTDKPI_ROW>
    <YEAR>2008</YEAR>
    <SALES>100</SALES>
    <PERCENT_TO_PLAN>0.8</PERCENT_TO_PLAN>
    </YTDKPI_ROW>
    <YTDKPI_ROW>
    <YEAR>2009</YEAR>
    <SALES>150</SALES>
    <PERCENT_TO_PLAN>0.85</PERCENT_TO_PLAN>
    </YTDKPI_ROW>
    </YTDKPI>
    </DATA>
    YEAR     <?for-each-group@column:YTDKPI_ROW;./YEAR?><?YEAR?><?end for-each-group?>     <? (/YTDKPI/YTDKPI_ROW[1]/YEAR div /YTDKPI/YTDKPI_ROW[2]/YEAR)?>
    SALES     <?for-each-group@column:YTDKPI_ROW;./YEAR?><?SALES?><?end for-each-group?>     <? (/YTDKPI/YTDKPI_ROW[1]/SALES div /YTDKPI/YTDKPI_ROW[2]/SALES)?>
    PERCENT TO PLAN     <?for-each-group@column:YTDKPI_ROW;./YEAR?><?PERCENT_TO_PLAN?><?end for-each-group?>     <? (/YTDKPI/YTDKPI_ROW[1]/PERCENT_TO_PLAN div /YTDKPI/YTDKPI_ROW[2]/PERCENT_TO_PLAN)?>From loading the xml data into word, copying and pasting the code into word (2007) and previewing I get:
    YEAR
    2008
    2009
    NaN
    SALES
    100
    150
    NaN
    PERCENT TO PLAN
    0.8
    0.85
    NaN
    If I use the other suggestion, for the calculation, it returns a blank cell.
    Please Help! What do I need to do?
    Again Many Thanks,
    Edited by: user11240727 on 17-Sep-2009 02:06

  • Trouble with Group By in RTF Template

    Hello All,
    I'm very new at RTF Template building, and I've spent hours trying to figure this out with no avail. I'm using BIP Desktop add-in for Word to load in my XML data and create some tables and charts. Right now I'm able to create a detail level table on the RTF, but I want to also create a summary level table. The summary table is where I get stuck, as I can't get my group by statements to work. I've tried to insert a table/form and use the table wizard, but neither work.
    My detail level table has customer and shipments (among a few other noncritical fields). I just want a summary table to show customer and total number of shipments (simple count function). Right now, my output looks something like this:
    Customer     Customer
    Brian Jones     Shipment 
         1
         1
         1
         1
         1
         1
         1
         1
         1
    So it groups by the customer fine, but doesn't actually count the shipments. It assigns a 1 for each shipment number, but doesn't actually count the fields to give a Brian - 9.
    Again, I'm very new at this, so this might be very basic. Also, if there are any good resources on RTF template building, I'd love some help on learning to do this stuff better.
    Thanks!
    Alex

    Don't you want to actually find the sum of the shipments to give you a count of shipments for the customer? Have you tried using the sum function for your shipments field?
    You could insert the shipment field, select function sum (from the drop-down menu) and check the 'On grouping' box..
    Send me your template and sample XML to [email protected] if you would like.

  • URGENT Help With Scientific Calculator!

    Hi everybody,
    I designed a calculator, and I need help with the rest of the actions. I know I need to use the different Math methods, but I tried tried that and it didn't work. Also, it needs to work as an applet and application, and in the applet, the buttons don't appear in order, how can I fix that?
    I will really appreciate your help with this program, I can't get it to work and I'm frustrated, I need to finish this for next Tuesday 16th. Please e-mail me at [email protected].
    Below is the code for the calcualtor.
    Thanks a lot!
    -Maria
    // calculator
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class calculator extends JApplet implements
    ActionListener
      private JButton one, two, three, four, five, six, seven,
      eight, nine, zero, dec, eq, plus, minus, mult, div, clear,
      mem, mrc, sin, cos, tan, asin, acos, atan, x2, sqrt, exp, pi, percent;
      private JLabel output, blank;
      private Container container;
      private String operation;
      private double number1, number2, result;
      private boolean clear = false;
      //GUI
      public void init()
        container = getContentPane();
        //Title
        //super("Calculator");
        JPanel container = new JPanel();     
        container.setLayout( new FlowLayout( FlowLayout.CENTER
        output = new JLabel("");     
        output.setBorder(new MatteBorder(2,2,2,2,Color.gray));
        output.setPreferredSize(new Dimension(1,26));     
        getContentPane().setBackground(Color.white);     
        getContentPane().add( "North",output );     
        getContentPane().add( "Center",container );
        //blank
        blank = new JLabel( "                    " );
        container.add( blank );
        //clear
        clear = new JButton( "CE" );
        clear.addActionListener(this);
        container.add( clear );
        //seven
        seven = new JButton( "7" );
        seven.addActionListener(this);
        container.add( seven );
        //eight
        eight = new JButton( "8" );
        eight.addActionListener(this);
        container.add( eight );
        //nine
        nine = new JButton( "9" );
        nine.addActionListener(this);
        container.add( nine );
        //div
        div = new JButton( "/" );
        div.addActionListener(this);
        container.add( div );
        //four
        four = new JButton( "4" );
        four.addActionListener(this);
        container.add( four );
        //five
        five = new JButton( "5" );
        five.addActionListener(this);
        container.add( five );
        //six
        six = new JButton( "6" );
        six.addActionListener(this);
        container.add( six );
        //mult
        mult = new JButton( "*" );
        mult.addActionListener(this);
        container.add( mult );
        //one
        one = new JButton( "1" );
        one.addActionListener(this);
        container.add( one );
        //two
        two = new JButton( "2" );
        two.addActionListener(this);
        container.add( two );
        //three
        three = new JButton( "3" );
        three.addActionListener(this);
        container.add( three );
        //minus
        minus = new JButton( "-" );
        minus.addActionListener(this);
        container.add( minus );
        //zero
        zero = new JButton( "0" );
        zero.addActionListener(this);
        container.add( zero );
        //dec
        dec = new JButton( "." );
        dec.addActionListener(this);
        container.add( dec );
        //plus
        plus = new JButton( "+" );
        plus.addActionListener(this);
        container.add( plus );
        //mem
        mem = new JButton( "MEM" );
        mem.addActionListener(this);
        container.add( mem );   
        //mrc
        mrc = new JButton( "MRC" );
        mrc.addActionListener(this);
        container.add( mrc );
        //sin
        sin = new JButton( "SIN" );
        sin.addActionListener(this);
        container.add( sin );
        //cos
        cos = new JButton( "COS" );
        cos.addActionListener(this);
        container.add( cos );
        //tan
        tan = new JButton( "TAN" );
        tan.addActionListener(this);
        container.add( tan );
        //asin
        asin = new JButton( "ASIN" );
        asin.addActionListener(this);
        container.add( asin );
        //acos
        acos = new JButton( "ACOS" );
        cos.addActionListener(this);
        container.add( cos );
        //atan
        atan = new JButton( "ATAN" );
        atan.addActionListener(this);
        container.add( atan );
        //x2
        x2 = new JButton( "X2" );
        x2.addActionListener(this);
        container.add( x2 );
        //sqrt
        sqrt = new JButton( "SQRT" );
        sqrt.addActionListener(this);
        container.add( sqrt );
        //exp
        exp = new JButton( "EXP" );
        exp.addActionListener(this);
        container.add( exp );
        //pi
        pi = new JButton( "PI" );
        pi.addActionListener(this);
        container.add( pi );
        //percent
        percent = new JButton( "%" );
        percent.addActionListener(this);
        container.add( percent );
        //eq
        eq = new JButton( "=" );
        eq.addActionListener(this);
        container.add( eq );
        //Set size and visible
        setSize( 190, 285 );
        setVisible( true );
    public static void main(String args[]){
        //execute applet as application
         //applet's window
         JFrame applicationWindow = new JFrame("calculator");
    applicationWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //applet instance
         calculator appletObject = new calculator();
         //init and start methods
         appletObject.init();
         appletObject.start();
      } // end main
      public void actionPerformed(ActionEvent ae)
        JButton but = ( JButton )ae.getSource();     
        //dec action
        if( but.getText() == "." )
          //if dec is pressed, first check to make shure there
    is not already a decimal
          String temp = output.getText();
          if( temp.indexOf( '.' ) == -1 )
            output.setText( output.getText() + but.getText() );
        //clear action
        else if( but.getText() == "CE" )
          output.setText( "" );
          operation = "";
          number1 = 0.0;
          number2 = 0.0;
        //plus action
        else if( but.getText() == "+" )
          operation = "+";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //minus action
        else if( but.getText() == "-" )
          operation = "-";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //mult action
        else if( but.getText() == "*" )
          operation = "*";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //div action
        else if( but.getText() == "/" )
          operation = "/";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //eq action
        else if( but.getText() == "=" )
          number2 = Double.parseDouble( output.getText() );
          if( operation == "+" )
            result = number1 + number2;
          else if( operation == "-" )
            result = number1 - number2;
          else if( operation == "*" )
            result = number1 * number2;
          else if( operation == "/" )
            result = number1 / number2;       
          //output result
          output.setText( String.valueOf( result ) );
          clear = true;
          operation = "";
        //default action
        else
          if( clear == true )
            output.setText( "" );
            clear = false;
          output.setText( output.getText() + but.getText() );
    }

    Multiple post:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=474370&tstart=0&trange=30

  • Help with Custom calculation script in Acrobat 8

    Hi all, I am using acrobat 8 on OS 10.5
    I am trying to add certain fields (numbers) and then subtract another field value to give an end result.
    I don't know anything about Javascript, would anyone be able to help with any info on how I achieve this result? I can only see Add, x and average etc... nothing there for subtraction
    Thanks for any help in advance
    Swen

    This should get you started:
    >if (event) {
    // get values from two text fields
    var a = Number(this.getField('Text1').value);
    var b = Number(this.getField('Text2').value);
    // subtract the values and show it
    this.event.target.value = a - b;
    Place this in a 3d text field, as a Custom Calculation Script.

  • Issue with ROUND function in RTF template

    Hi All,
    Can anyone please help me in implementing the ROUND function at the RTF template.
    Need to handle rounding of amounts at the RTF template level itself.
    The ROUND function should be implemented to the following tags:
    <?sum(current-group()/TAXABLE_AMOUNT)?> (Record level)
    <?sum(TAXABLE_AMOUNT)?> (Report level total)
    Eg. If the Sum(current-group()/TAXABLE_AMOUNT) for a particular record is 401.65 then it should round of to 402
    we try to do this using following syntax ..
    1) by declaring variable "value"
    <?xdoxslt:set_variable($_XDOCTX, value, sum(current-group()/TAXABLE_AMOUNT))?>
    2) <?xdofx:round(sum(current-group()/TAXABLE_AMOUNT))?>
    3)<?xdofx:round(xdoxslt:sum(current-group()/TAXABLE_AMOUNT))?>
    but we ding get the solution.
    A quick response on this is highly appreciable.
    Thanks,
    Praveen

    Re: Summing derived values within xdofx:
    Re: Rounding not working

  • Help with query calculations (recursive)

    Hi All,
    I want some help with a query using a base rate and the result use in the next calculation year.
    Here an example:
    create table rate_type(
    rate_type_id    number,
    rate_desc       nvarchar2(50),
    rate_base_year  number
    insert into rate_type(rate_type_id, rate_desc, rate_base_year) values (1, 'Desc1', 4.6590);
    insert into rate_type(rate_type_id, rate_desc, rate_base_year) values (2, 'Desc2', 4.6590);
    create table rates (
    rate_type_id number
    rate_year    number,
    rate_value   number
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2012, 1.2);
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2013, 1.3);
    insert into rates(rate_type_id, rate_year, rate_value) values (1, 2014, 1.4);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2012, 1.2);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2013, 1.3);
    insert into rates(rate_type_id, rate_year, rate_value) values (2, 2014, 1.4);The calculation for the first year should be the base rate of the rate type. The next year should use the result of the previous year and so on.
    The result of my sample data is:
    2012 = 4.659 + 1.2 + 4.659 * (1.2 * 0.01) = 5.9149
    2013 = 5.9149 + 1.3 + 5.9149 * (1.3 * 0.01) = 7.1859
    2014 = 7.1859 + 1.4 + 7.1859 * (1.4 * 0.01) = 8.4721Query result:
    NAME 2012 2013 2014
    Desc1 5.9149 7.1859 8.4721
    Desc2 XXXX XXX XXXX
    How can I do this in one select statement? Any ideas?
    Thanks!

    Assuming you are on 11.2:
    with t as (
               select  a.rate_type_id,
                       rate_desc,
                       rate_year,
                       rate_base_year,
                       rate_value,
                       count(*) over(partition by a.rate_type_id) cnt,
                       row_number() over(partition by a.rate_type_id order by rate_year) rn
                 from  rate_type a,
                       rates b
                 where a.rate_type_id = b.rate_type_id
        r(
          rate_type_id,
          rate_desc,
          rate_year,
          rate_base_year,
          rate_value,
          cnt,
          rn,
          result
         ) as (
                select  rate_type_id,
                        rate_desc,
                        rate_year,
                        rate_base_year,
                        rate_value,
                        cnt,
                        rn,
                        rate_base_year + rate_value + rate_base_year * rate_value * 0.01 result
                  from  t
                  where rn = 1
               union all
                select  t.rate_type_id,
                        t.rate_desc,
                        t.rate_year,
                        t.rate_base_year,
                        t.rate_value,
                        t.cnt,
                        t.rn,
                        r.result + t.rate_value + r.result * t.rate_value * 0.01 result
                  from  r,
                        t
                  where t.rate_type_id = r.rate_type_id
                    and t.rn = r.rn + 1
    select  *
      from  (
             select  rate_desc name,
                     rate_year,
                     result
               from  r
               where rn <= cnt
      pivot (sum(result) for rate_year in (2012,2013,2014))
      order by name
    NAME             2012       2013       2014
    Desc1        5.914908  7.2918018 8.79388703
    Desc2        5.914908  7.2918018 8.79388703
    SQL> Obviously pivoting assumes you know rate_year values upfront. If not, then without pivoting:
    with t as (
               select  a.rate_type_id,
                       rate_desc,
                       rate_year,
                       rate_base_year,
                       rate_value,
                       count(*) over(partition by a.rate_type_id) cnt,
                       row_number() over(partition by a.rate_type_id order by rate_year) rn
                 from  rate_type a,
                       rates b
                 where a.rate_type_id = b.rate_type_id
        r(
          rate_type_id,
          rate_desc,
          rate_year,
          rate_base_year,
          rate_value,
          cnt,
          rn,
          result
         ) as (
                select  rate_type_id,
                        rate_desc,
                        rate_year,
                        rate_base_year,
                        rate_value,
                        cnt,
                        rn,
                        rate_base_year + rate_value + rate_base_year * rate_value * 0.01 result
                  from  t
                  where rn = 1
               union all
                select  t.rate_type_id,
                        t.rate_desc,
                        t.rate_year,
                        t.rate_base_year,
                        t.rate_value,
                        t.cnt,
                        t.rn,
                        r.result + t.rate_value + r.result * t.rate_value * 0.01 result
                  from  r,
                        t
                  where t.rate_type_id = r.rate_type_id
                    and t.rn = r.rn + 1
    select  rate_desc name,
            rate_year,
            result
      from  r
      where rn <= cnt
      order by name,
               rate_year
    NAME        RATE_YEAR     RESULT
    Desc1            2012   5.914908
    Desc1            2013  7.2918018
    Desc1            2014 8.79388703
    Desc2            2012   5.914908
    Desc2            2013  7.2918018
    Desc2            2014 8.79388703
    6 rows selected.
    SQL> SY.

  • Help with Match Calculations

    I have a simple form on a web page for associaiton members to
    order lapel pins. I want to provide a toal cost of the order but I
    can't for the life of me get anything to multiply the value in a
    text fiels by a constant number ($5.00). I found some Javascript on
    the internet but I couldn't get it to function either. I am using
    Dreamweaver 8 and cannot find any reference to simple math
    calculations. Imust be overlooking something as something so simple
    can't be that hard. Can someone provide me with some simple script
    or method of doing this?

    >I have a simple form on a web page for associaiton
    members to order lapel
    >pins.
    > I want to provide a toal cost of the order but I can't
    for the life of me
    > get
    > anything to multiply the value in a text fiels by a
    constant number
    > ($5.00).
    In ASP/VBSCRIPT:
    <%
    Dim varAmount
    varAmount = Request.Form("HowMany") * 5
    Response.Write FormatCurrency("varAmount")
    %>

  • Help with Javascript/Calculations

    Hello,
    Have a building use policy for school.
    Need help with checkboxes and default values.  I can get javascript/math to work when I click check box.
    Someone wants to rent a room they check the rentRoom checkbox.  Then the enter how many rooms 1,2,3 etc..  The value for the rentRoom checkbox is $25.
    I can get it when the checkbox for rentRoom is selected the rentRoom.Total computes correctly.  However, what I want is when the form opens up a default value of $0.00 to be in there.  I also want if someone goes back and unchecks the rentRoom checkbox the value goes back to $0.00 not just blank.   Right now I am getting the error the value entered does not match the value of the field.  That is if I put the default value in options.  Basically, I can't seem to figure out the javascript code to get this to work.
    Am I asking for too much, can someone guide me to javascript to help me out.
    I have tried if/then statements and switch statements.  I just can't figure out how to get it to for lack of better a word - toggle back and forth.
    If this is not possible please tell me.  If it is too complicated tell me.  I am not using livecycle for this as we had a word document and I just used the find form fields.  I am also using Adobe Acrobat 8 Professional.
    Thanks

    Hello,
    Thanks that looks good.  I am still missing something but the calc doesn't work when I put in my variables.  I will work with it more but nothing happens.
    The one thing is I have the default value of the checkbox as 15 so don't know if that messes it up.
    Right now I get the default value of $0.00 all the time.  When I click on the check box on/off it doesn't do the calcs.
    sorry, any more input, what am i missing??
    I also changed the syntax error that was posted on your origianl post.  You had == 'Off" I changed that to 'Off'

  • Problem with Cross-tab report (RTF Template) null values, current-group()

    Hi, experts!
    I generate Cross-tab report using RTF Tamlpate and I have problem with grouping.
    My XML file have to be with one group only because I want to using dynamic regrouping inside the RTF template.
    Here is my data structure (XML file):(Look the images for details)
    http://img156.imageshack.us/img156/3997/xmlstructureay9.jpg
    =======================
    WITH GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/2951/resultcrosstabbycustomehf8.jpg
    When I'm using grouping and I want to have for each group cross-tab report I have the following problem: (Look the images for details)
    http://img156.imageshack.us/img156/8786/resultcrosstabbycustomect9.jpg
    And this is my code I'm using inside the RTF template with groups:(Look the images for details)
    http://img156.imageshack.us/img156/4253/fieldbrowserxb7.jpg
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    =======================
    WITHOUT GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/9545/resultcrosstabwithoutgrzg7.jpg
    When I generate one cross-tab there is no problem: (Look the images for details)
    http://img156.imageshack.us/img156/7030/resultcrosstabwithoutgrsr1.jpg
    This is my code I'm using inside the RTF template WITHOUT groups:(Look the images for details)
    http://img151.imageshack.us/img151/7030/fieldbrowserwithoutgrours8.jpg
    Can someone give me a hand to deal with this?
    Thank you!

    Pitson,
    better to ask this question in the BI Publisher Forum than here in the Oracle Reports Forum:
    BI Publisher
    Regards
    Rainer

  • Problem with Cross-tab report (RTF Template)

    Hi, experts!
    I generate Cross-tab report using RTF Tamlpate and I have problem with grouping.
    My XML file have to be with one group only because I want to using dynamic regrouping inside the RTF template.
    Here is my data structure (XML file):(Look the images for details)
    http://img156.imageshack.us/img156/3997/xmlstructureay9.jpg
    =======================
    WITH GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/2951/resultcrosstabbycustomehf8.jpg
    When I'm using grouping and I want to have for each group cross-tab report I have the following problem: (Look the images for details)
    http://img156.imageshack.us/img156/8786/resultcrosstabbycustomect9.jpg
    And this is my code I'm using inside the RTF template with groups:(Look the images for details)
    http://img156.imageshack.us/img156/4253/fieldbrowserxb7.jpg
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    =======================
    WITHOUT GROUPS
    =======================
    Here is my RTF template:
    http://img151.imageshack.us/img151/9545/resultcrosstabwithoutgrzg7.jpg
    When I generate one cross-tab there is no problem: (Look the images for details)
    http://img156.imageshack.us/img156/7030/resultcrosstabwithoutgrsr1.jpg
    This is my code I'm using inside the RTF template WITHOUT groups:(Look the images for details)
    http://img151.imageshack.us/img151/7030/fieldbrowserwithoutgrours8.jpg
    Can someone give me a hand to deal with this?
    Thank you!

    Pitson,
    better to ask this question in the BI Publisher Forum than here in the Oracle Reports Forum:
    BI Publisher
    Regards
    Rainer

  • Help with Auto calculations

    I have an existing pdf that i am trying to edit and make it more functional...i.e. fillable info with auto calculations of cost based on a given number (times a specific cost)
    Example on the form....
    Car Registrations (per car) _____ X $25 _________
    The first line above is # Cars Registered
    The last line is Total Cost
    The blank lines above i have added a text box to for auto calculations. I have formated these boxes as numbers (first line) and dollar value total (second line)
    I've added another text box for the $25 and placed it overtop the worded one. I've locked this box and the total box. I've calculated the product of the total box by linking it to the first line and the $25 to give the total cost...
    Problem is, it isnt working....the total box isn't seeing the $25 to give a proper calc. Whatever number i place in the first line, only zero shows in the total.
    I'm obviously missing something....been at this for two days....frustrated. I have many more inputs like this on the form, and eventually want all the totals to provide sub totals and a grand total. I understand how this all works to a degree, doesnt seem that difficult, but i have to be missing something.
    I even tried re-creating the document in word, input to adobe, make a new form, let the system recoginize areas as fillable, etc, etc, etc. When i get to the calculations portion, same result...there are not many tutorials out there on this...sadly
    Woking on a MAC...
    I have acrobat X Pro

    gr8snkbite wrote:
    I have an existing pdf that i am trying to edit and make it more functional...i.e. fillable info with auto calculations of cost based on a given number (times a specific cost)
    Example on the form....
    Car Registrations (per car) _____ X $25 _________
    The first line above is # Cars Registered
    The last line is Total Cost
    The blank lines above i have added a text box to for auto calculations. I have formated these boxes as numbers (first line) and dollar value total (second line)
    I've added another text box for the $25 and placed it overtop the worded one. I've locked this box and the total box. I've calculated the product of the total box by linking it to the first line and the $25 to give the total cost...
    Problem is, it isnt working....the total box isn't seeing the $25 to give a proper calc. Whatever number i place in the first line, only zero shows in the total.
    I'm obviously missing something....been at this for two days....frustrated. I have many more inputs like this on the form, and eventually want all the totals to provide sub totals and a grand total. I understand how this all works to a degree, doesnt seem that difficult, but i have to be missing something.
    I even tried re-creating the document in word, input to adobe, make a new form, let the system recoginize areas as fillable, etc, etc, etc. When i get to the calculations portion, same result...there are not many tutorials out there on this...sadly
    Woking on a MAC...
    I have acrobat X Pro
    I created your sample.
    name the field after Number  of cars, as car
    The calulation field named total

Maybe you are looking for

  • Connecting iPad to LED TV HDMI Slot

    I have an iPad with Retina Display and would like to connect it to my Samsung LED TV via the HDMI slot so I can watch Sky Go from my iPad on my TV. Which cable do I need please? Help much appreciated.

  • Cannot install appleworks 6 with OS 10.4.11 because I do not have classic

    Can someone help me with this. I put Apple Works 6 CD into computer and it will not install, says I do not have a classic folder or OS 9.0 I have Microsoft Mac Version on this computer and want this software as well installed, can you please guide me

  • Re-format iPod from Windows to Mac without losing songs/restoring...?

    I have a 5th generation iPod video that was originally formatted with my old Dell PC laptop - I have just recently purchased a new MacBook Pro and want to format/update my iPod for it to work properly with my new Mac. How can I go about doing this wi

  • Ability to open multiple tabs stopped working.

    I have always been able to open multiple tabs using Command-T - now all of a sudden when I use that shortcut, it just opens to the multi-tab screen instead of a new tab and no way to get back to the page I was on. 

  • PLSQL join does not work with RAW fields

    Hi All, I wanna to do a join between two table which have as primary key a GUID field (RAW 16). To do this I'm creating a cursor and the sql is simple. However, it returns the following error when I try to compile the procedure: Error(41,3): PL/SQL: