8 Replies Latest reply: Aug 30, 2012 10:47 AM by user7498756 RSS

    Cannot convert  to number

    user7498756
      Hi,
      i am doing some calcualtion in my report. Now to get final result i have a code like this

      <?xdoxslt:get_variable($_XDOCTX,'v1Total') - xdoxslt:get_variable($_XDOCTX,'v2Total')?>


      That above code giving me error

      Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert to number.

      whereas my code in variables is

      1) <?choose:?>
      <?when://Measure='Killo'?>
      <?APrice * .001?>
      <?xdoxslt:set_variable($_XDOCTX,'v1Total',APrice * .001)?>
      <?end when?>
      <?otherwise:?>
      <?APrice?>
      <?xdoxslt:set_variable($_XDOCTX,'v1Total',APrice)?>
      <?end otherwise?>
      <?end choose?>


      2) <?choose:?>
      <?when://Measure='Killo'?>
      <?APrice * .001?>
      <?xdoxslt:set_variable($_XDOCTX,'v2Total',APrice * .001)?>
      <?end when?>
      <?otherwise:?>
      <?APrice?>
      <?xdoxslt:set_variable($_XDOCTX,'v2Total',APrice)?>
      <?end otherwise?>
      <?end choose?>

      Edited by: user7498756 on Aug 29, 2012 1:51 PM

      Edited by: user7498756 on Aug 29, 2012 2:05 PM