2 Replies Latest reply on May 8, 2008 5:52 AM by TheFlexMan

    NEED ADVICE ON USING CURRENCY FORMATTER

    TheFlexMan
      Can anyone help me unravel this mystery:

      I have a textbox setup to use a currency formatter. The datafield is from an XML datasource. If I display the datafield without using the currency formatter, the result appears fine. However when using the currencyformatter, ZERO appears.

      Here's how I setup my currencyformatter:

      <mx:CurrencyFormatter id="currency1" precision="1" currencySymbol="" useThousandsSeparator="true"/>

      And here is the way it's utilized:

      <mx:Text x="648" y="359" id="tab1qty" text=" {currency1.format(myTotal.tab1qty)}" width="134" textAlign="right" fontWeight="bold"/>

      Here is my xml datasource:

      <mx:XML id="myTotal">

      <tt_totals>

      <tab1qty>{tab1qty.text}</tab1qty>
      <tab1vol>{tab1vol.text}</tab1vol>
      <tab2qty>{tab2qty.text}</tab2qty>
      <tab2vol>{tab2vol.text}</tab2vol>
      <tab2oh>{tab2oh.text}</tab2oh>
      <tab3qty>{tab3qty.text}</tab3qty>
      <tab3value>{tab3value.text}</tab3value>
      <success></success>
      <errormsg></errormsg>

      </tt_totals>
      </mx:XML>

      Thanks for helping,

      Jim.