0 Replies Latest reply on Oct 8, 2007 4:50 PM by Pops_ma

    Display Crosstab query in DataGrid

    Pops_ma
      Hi, I'm a Flex beginner. Could someone please help me how to display crosstab query result in DataGrid? The following query returns 6 columns:
      - First column: values in the field Sell_Channel
      - Second: Sum(Revenue Total) from the Revenue field.
      - Others: Revenue Subtotal by Sell_Channel and quarter. Quarters are values stored in the field name Quarter. In Datagrid, what would be the datafield for these 4 quarter columns?

      Thanks millions.

      Here is my SQL:
      TRANSFORM Sum(Revenue.RevenueTotal) AS SumOfRevenueTotal
      SELECT Revenue.Sell_Channel, Sum(Revenue.RevenueTotal) AS [Total Of RevenueTotal]
      FROM Quarter INNER JOIN Revenue ON Quarter.FiscalQuarter = Revenue.Quarter
      WHERE (Revenue.Fiscal_Year="2006")
      GROUP BY Revenue.Sell_Channel
      PIVOT Quarter.Quarter;