to Siva:应该不是datafield的问题吧,只是如果用静态表的话是没问题的,像直接select 数值字段出来然后再显示到fastreport中时没问题,而我用的语句是类似如下的:
select (select Vehicle_TypeName from Vehicle_Type b where b.Vehicle_TypeOID=a.Vehicle_TypeOID) Vehicle_TypeName,'+
'count(case when d.customertypeoid=1 then
grossoperatorOID end) sumcount1,'+
'count(case when d.customertypeoid<>1 and c.IsMonth=0 then
grossoperatorOID end) sumcount2,'+
'count(case when d.customertypeoid<>1 and c.IsMonth<>0 then
grossoperatorOID end) sumcount3,'+
'count(grossoperatorOID) sumcount,'+
'sum(case when d.customertypeoid=1 then
amount else
0 end) amount1,'+
'sum(case when d.customertypeoid<>1 and c.IsMonth=0 then
amount else
0 end) amount2,'+
'sum(amount) amount '+
' from vehicle_charge a,account c,customer d '+
' where a.accountoid=c.accountoid and '+
' c.customeroid=d.customeroid group by Vehicle_TypeOID
这时才提示错误