存储过程里面添加合计行
2011-11-3 0.5*500 4860 sum18 #VALUE! 18.441 89623.26 #VALUE! FALSE
0.7*500 4860 18 0 18
亚华铁柜 0.6*500 4860 6 6.092 29607.12 -0.092
0.7*610 4880 14 0 14
0.5*500 4860 12 0 12
0.6*500 4860 12 11.958 58115.88 0.042
合计 #NAME? 36.491 177346.26 #VALUE!
合计 #NAME? #VALUE! 36.491 177346.26 #VALUE! #DIV/0!
王桂海 11月2日 0.3*500 5050 6 9090 0 6 9090
0 0
0 0
0 0
合计 0 0 0 0
合计 6 9090 0 0 6 #DIV/0!
按照 客户 时间 进行合计! 报表 !急! select 日期,字段1,字段2 from 表
union
select 日期,sum(字段1),sum(字段2) from 表 group by 日期
select boss.BaseNumberTime as BaseNumberTime,boss.Fnumber as Fnumber,boss.Fbase as Fbase, boss.fName as Fname,boss.Fdate as Fdate,boss.fModel as fModel,sum(boss.FDecimal1) as FDecimal1,sum(boss.FDecimal4) as FDecimal4,sum(boss.FAmount) as FAmount,sum(boss.FQty) as FQty,boss.FDue as FDue
from
(
select BaseNumberTime as BaseNumberTime,Fnumber as Fnumber, Fbase as Fbase, Fname as Fname,Fdate as Fdate ,Fmodel as fModel,FDecimal1 as FDecimal1,FDecimal4 as FDecimal4,FAmount as FAmount,0 as FQty,FDue as FDue from Im_indent_insert
union all
select BaseNumberTime as BaseNumberTime,FItemFnumber as Fnumber,Fbase as Fbase,Fname as Fname,Fdate as Fdate,Fmodel as fModel,0 as FDecimal1,0 as FDecimal4,0 as FAmount,FQty as FQty, 0 as FDue from IM_stock_insert
)boss
group by boss.BaseNumberTime,boss.Fnumber,boss.Fbase,boss.Fname,boss.Fdate,boss.fModel,boss.FDue
大虾 可不可以 在详细一点!
做出来效果 如何可以像这样!
大虾 可不可 详细一点 下面我把我的 查询存储语句写下,合计哪里详细点 的怎么写呢?
补充:VB , 数据库(包含打印,安装,报表)