0 Replies Latest reply on Sep 4, 2013 8:25 AM by Hallo Man

    Binding webService complex resultXML with DataGrid

    Hallo Man

      Hi,

       

      Am not much handy in Flex but just started, trying to bind my webService resultXML with DataGrid but not able to achive as result XML is very complex.

      This webservice executes some report and returns report results in XML whcih should be populated at Flex Grid, also report headers and values from resultXML wouldn't be same everytime.

      So if anyone could share me a AS or MXML wich can bind any report resultXML to dataGrid would be great.

      Thanks in advance.

       

      Expected DataGrid outPut is:

       

      YearQuaterRevenue
      20102010Q11682656

      2010 Q21985787.5

      2010 Q32314294.50000001

      2010 Q42664500.09999997
      20112011 Q12498756

      2011 Q22684763.60000001

      2011 Q33067019.00000001

      2011 Q43267067.39999997
      20122012 Q13111989

      2012 Q23504479.10000003

       

      resultXML:

       

      <report_data_list scp="1" crt="1378303832000">

          <report_data locc="US" id="DC7696474D693E3D3570BF9793654FF9" locid="1033" name="DemoReport" locl="en" istab="1">

              <prs>

                  <pr v="0" n="LongNames" psn="Template Formatting"></pr>

                  <pr v="" n="VisProps" psn="Visualization"></pr>

              </prs>

              <styles>

                  <style id="c13">

                      <prs n="FormattingNumber">

                          <pr v="1" n="Category"></pr>

                          <pr v="0" n="DecimalPlaces"></pr>

                          <pr v="-1" n="ThousandSeparator"></pr>

                          <pr v="$" n="CurrencySymbol"></pr>

                          <pr v="0" n="CurrencyPosition"></pr>

                          <pr v="&quot;$&quot;#,##0" n="Format"></pr>

                          <pr v="1" n="NegativeNumbers"></pr>

                      </prs>

                  </style>

              </styles>

              <objects>

                  <attribute rfd="0" id="8D679D5111D3E4981000E787EC6DE8A4" name="Year" type="12">

                      <form rfd="1" id="45C11FA478E745FEA08D781CEA190FE5" base_form_type="2" name="ID" id_form="1" type="21"></form>

                  </attribute>

                  <attribute rfd="2" id="8D679D4A11D3E4981000E787EC6DE8A4" name="Quarter" type="12">

                      <form rfd="3" id="CCFBE2A5EADB4F50941FB879CCF1721C" base_form_type="3" name="DESC" type="21"></form>

                  </attribute>

                  <metric rfd="4" id="4C05177011D3E877C000B3B2D86C964F" name="Revenue" type="4">

                          <format cat="1" cp="0" ts="-1" nn="1" dp="0" cs="$">"$"#,##0</format>

                  </metric>

              </objects>

              <template>

                  <axis id="1">

                      <unit rfd="0" unit_type="1"></unit>

                      <unit rfd="2" unit_type="1"></unit>

                  </axis>

                  <axis id="2">

                      <unit unit_type="3">

                          <oi rfd="4"></oi>

                      </unit>

                  </axis>

                  <axis id="3">

                  </axis>

              </template>

              <raw_data>

                  <headers>

                      <oi rfd="0"></oi>

                      <oi rfd="2"></oi>

                      <oi rfd="4"></oi>

                  </headers>

                  <rows cn="10">

                      <r fr="1">

                          <v id="BB:8D679D5111D3E4981000E787EC6DE8A4:1:1:0:2:2010">2010</v>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20101">2010 Q1</v>

                          <v stid="c13">1682656</v>

                      </r>

                      <r>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20102">2010 Q2</v>

                          <v stid="c13">1985787.5</v>

                      </r>

                      <r>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20103">2010 Q3</v>

                          <v stid="c13">2314294.50000001</v>

                      </r>

                      <r>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20104">2010 Q4</v>

                          <v stid="c13">2664500.09999997</v>

                      </r>

                      <r>

                          <v id="BB:8D679D5111D3E4981000E787EC6DE8A4:1:1:0:2:2011">2011</v>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20111">2011 Q1</v>

                          <v stid="c13">2498756</v>

                      </r>

                      <r>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20112">2011 Q2</v>

                          <v stid="c13">2684763.60000001</v>

                      </r>

                      <r>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20113">2011 Q3</v>

                          <v stid="c13">3067019.00000001</v>

                      </r>

                      <r>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20114">2011 Q4</v>

                          <v stid="c13">3267067.39999997</v>

                      </r>

                      <r>

                          <v id="BB:8D679D5111D3E4981000E787EC6DE8A4:1:1:0:2:2012">2012</v>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20121">2012 Q1</v>

                          <v stid="c13">3111989</v>

                      </r>

                      <r>

                          <v id="BB:8D679D4A11D3E4981000E787EC6DE8A4:1:1:0:2:20122">2012 Q2</v>

                          <v stid="c13">3504479.10000003</v>

                      </r>

                  </rows>

              </raw_data>

          </report_data>

      </report_data_list>