B benye Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-23 #1 我的报表须在每页的页脚打小计,在最后一页先打小计再打合计,每页小计可以在PAGEFOOTER做 但在最后一页怎样先打小计再打合计?
向 向红林 Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-23 #2 我的答题有。 http://www.gislab.ecnu.edu.cn/delphibbs/DispQ.asp?LID=287170
O OopsWare Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-23 #3 SELECT * FROM ( SELECT 1 ID, * FROM TABLE UNION ALL SELECT 2 ID, '小计',,...,,SUM(??) FROM TABLE GROUP BY ???? UNION ALL SELECT 3 ID, '合计',,...,,SUM(??) FROM TABLE ) T ORDER BY ID
SELECT * FROM ( SELECT 1 ID, * FROM TABLE UNION ALL SELECT 2 ID, '小计',,...,,SUM(??) FROM TABLE GROUP BY ???? UNION ALL SELECT 3 ID, '合计',,...,,SUM(??) FROM TABLE ) T ORDER BY ID