3 Replies Latest reply: Feb 21, 2013 4:33 AM by AlexAnd RSS

    How to add elements (horizontal) on data template (RTF)

    kp2000
      Hello
      Below is my layout:(BI Publisher 10g)

      col1 col2 col 3 col4 col5(SUM)
      10 10 10 10 ?

      I want to add col 5 like (col1+col2+col3+col4=40)

      What will be the right tag?


      I tried in many ways with no success.
      <?sum(col1+col2+col3+col4)?>
      <?xdoxslt:sum(col1+col2+col3+col4)?>
      ==>Nothing help me

      Appreciate your help

      thanks
      kp

      Edited by: user8612301 on Feb 1, 2013 2:39 PM
        • 1. Re: How to add elements (horizontal) on data template (RTF)
          AlexAnd
          use xdoxslt:set_variable and xdoxslt:get_variable

          after col set variable and in sum get it
          COL1                                                   | COL2                                                    |...| col5(SUM)
          --------------------
          <?COL1?><?xdoxslt:set_variable($_XDOCTX,'LVar1',COL1)?>| <?COL2?><?xdoxslt:set_variable($_XDOCTX,'LVar2', COL2)?>|...|<?xdoxslt: get_variable($_XDOCTX, 'LVar1')+ xdoxslt: get_variable($_XDOCTX, 'LVar2')+ xdoxslt: get_variable($_XDOCTX, 'LVar3')+ xdoxslt: get_variable($_XDOCTX, 'LVar4')?>
          • 2. Re: How to add elements (horizontal) on data template (RTF)
            kp2000
            Hi Alex

            Thanks a lot..It was very useful..But i have one more issue..I have to add 22 fields and I have no space inside the place in RTF field where we write xml tags..
            for this big formula..
            Please advice if there is any workaround?

            thanks
            kp
            • 3. Re: How to add elements (horizontal) on data template (RTF)
              AlexAnd
              try to put into fields

              >
              user8612301      
                   Newbie
                   
              Handle:      user8612301
              Status Level:      Newbie
              Registered:      May 17, 2010
              Total Posts:      135
              Total Questions:      87 (82 unresolved)
              >
              close the thread if it is answered
              it will be helpful for other users