MaxAmsterdam
Member
[frown]
Can anyone help me? I have produced a report based on a BV Join of F4211 & F4209 tables. The sql query from MS Query listed is what I recieved from a functional guy who ask me to produce a report from this.
*******************************************************************
SELECT SDDOCO ,
COUNT(SDDOCO) ,
SUM(CASE VALUE(HOLNID, 0) WHEN 0 THEN 0 ELSE 1 END) ,
SDAN8 ,
SDDCTO FROM F4211 LEFT OUTER JOIN F4209 ON SDDOCO=HODOCO AND HOKCOO= SDKCOO AND HOLNID = SDLNID AND HOHCOD='PA' AND HORDC<>'PD' WHERE
SDMCU=' 100' OR
SDMCU=' 110' OR
SDMCU=' 700' AND
SDLNTY='S' AND SDNXTR<>'999'
GROUP BY SDDOCO , SDAN8, SDDCTO
HAVING SUM(CASE VALUE(HOLNID, 0) WHEN 0 THEN 0 ELSE 1 END)<>0
ORDER BY Count(SDDOCO)
******************************************************************
I have managed to produce this report using Level Break and Event rules. But, because the Count(SDDOCO) is declared as a RV Variable, how can I use this variable to sort the whole report? The only columns available in the 'Define Data Sequence' are the ones in the Business View... Can any one help in knowing how to sort on this RV Variable????
Max
Can anyone help me? I have produced a report based on a BV Join of F4211 & F4209 tables. The sql query from MS Query listed is what I recieved from a functional guy who ask me to produce a report from this.
*******************************************************************
SELECT SDDOCO ,
COUNT(SDDOCO) ,
SUM(CASE VALUE(HOLNID, 0) WHEN 0 THEN 0 ELSE 1 END) ,
SDAN8 ,
SDDCTO FROM F4211 LEFT OUTER JOIN F4209 ON SDDOCO=HODOCO AND HOKCOO= SDKCOO AND HOLNID = SDLNID AND HOHCOD='PA' AND HORDC<>'PD' WHERE
SDMCU=' 100' OR
SDMCU=' 110' OR
SDMCU=' 700' AND
SDLNTY='S' AND SDNXTR<>'999'
GROUP BY SDDOCO , SDAN8, SDDCTO
HAVING SUM(CASE VALUE(HOLNID, 0) WHEN 0 THEN 0 ELSE 1 END)<>0
ORDER BY Count(SDDOCO)
******************************************************************
I have managed to produce this report using Level Break and Event rules. But, because the Count(SDDOCO) is declared as a RV Variable, how can I use this variable to sort the whole report? The only columns available in the 'Define Data Sequence' are the ones in the Business View... Can any one help in knowing how to sort on this RV Variable????
Max