Dear,
when I use crosstab, I can get
I use below SQL:
SELECT
INVMA.MA003 AS GROUPID,INVMB.MB500 AS PRODUCT,INVMB.MB002 AS DEVICE,INVMB.MB550 AS ASSYPhase,SUM(IDLMG.MG008*IDLMG.MG009) AS DEVICENUM,INVMB.MB003 AS PackageType
FROM
INVMB INNER JOIN IDLMG ON IDLMG.MG006 = INVMB.MB001 INNER JOIN INVMA ON INVMA.MA002=INVMB.MB007
WHERE
IDLMG.MG015='Y' AND MG017 <>'FAIL-HK' AND IDLMG.MG012<'20150305'
GROUP BY
INVMA.MA003,INVMB.MB500,INVMB.MB002,INVMB.MB550,INVMB.MB003
ORDER BY
INVMA.MA003 ASC,INVMB.MB500 ASC,INVMB.MB550 ASC,INVMB.MB002 ASC
and put GROUPID, PRODUCT,DEVICE,PackageType in ROW Axis and ASSYPhase in COLUMN Axis, DEVICENUM in Data Cell. The table can show the result.
But, the COL ASSYPhase has '1-4' value , but the order is not '1, 2, 3, 4' , it show '1, 3, 2, 4 ' as below screen:
002.jpg
And I adjust order by in SQL, there is no change with the report sheet.
Question: how to avoild such proble? I want to order ASSYPhase with '1 , 2 , 3 , 4'
Another, when I set RowBanding Function with this crosstab, but the sheet result as below:
001.jpg
Question: How to resolve rowband on crosstab? Have close ignore crosstab.
Thanks a lot.