解决方案: |
做自定义报表。
在自定义报表中,录入如下语句:
select fitemss98.citemname as 项目名称,fitemss98.cDirection as 方向,
sum(GL_cashtable.md-GL_cashtable.mc) as 金额,Department.cDepName as 部门,
GL_cashtable.iperiod as 会计期间
From GL_cashtable, GL_accvouch, fitemss98,fitemss98class,Department
Where GL_cashtable.iSignSeq = GL_accvouch.iSignSeq
and GL_accvouch.ino_id=GL_cashtable.ino_id
and GL_accvouch.inid=GL_cashtable.inid
and GL_accvouch.iperiod=GL_cashtable.iperiod
and (GL_accvouch.iflag=2 or GL_accvouch.iflag is null)
and fitemss98.citemcode=GL_cashtable.cCashitem
and fitemss98.citemccode=fitemss98class.citemccode
and Department.cDepCode = GL_accvouch.cdept_id
and 1 = 1
group by fitemss98class.citemccode,fitemss98class.citemcname,fitemss98.citemcode, fitemss98.citemname,fitemss98.cDirection,Department.cDepName,GL_cashtable.iperiod
order by fitemss98class.citemccode,fitemss98class.citemcname,fitemss98.citemcode, fitemss98.citemname,fitemss98.cDirection
执行之,问题解决!
|