sele * from xx.dbf where 条件 ORDER BY xx INTO CURSOR xxb
sele 'xxb'
report form abc.frx to print
下面是我的程序里的一段代码,请参考:
m.QSXH = ThisForm.TEXT起始.Value
m.JSXH = ThisForm.TEXT终止.Value
SELECT BMXH,XM,XBDM,KLDM,SFZH,YYZK,SG,TZ,ZXMC,ZYKH,ZXM,XBDM.MC AS XBMC,KLDM.MC AS KLMC,YYZK.MC AS YYZKMC ;
FROM BMK LEFT JOIN XBDM ON XBDM = XBDM.DM LEFT JOIN KLDM ON KLDM = KLDM.DM LEFT JOIN YYZK ON YYZK = YYZK.DM;
WHERE LEFT(bmk.BMXH,8) = m.ZXDM AND LEFT(bmk.BMXH,4) <> "DELE" AND bmk.BMXH >= m.QSXH AND bmk.BMXH <= m.JSXH;
AND SUBSTR(BMXH,5,2)<'94'ORDER BY BMXH INTO CURSOR XXB
[此贴子已经被作者于2005-12-7 17:46:18编辑过]