首页 > 解决方案 > 此字段无法在 Crystal 报表中汇总

问题描述

int((Sum({@Tot_Ot},{ReportEmpAttendanceView.EmpId}))/60)+((Sum({@Tot_Ot},{ReportEmpAttendanceView.EmpId}) mod 60)/100)

这里@Tot_Ot 无法总结。@Tot_Ot 公式看起来像这样

HOUR({@Over_Time})*60+MINUTE({@Over_Time})

这里@Over_Time 公式看起来像这样

else if {@USER}="b3" then
      if {ReportEmpAttendanceView.Sts}='H' then
        time(00,00,00)

     else if {ReportEmpAttendanceView.Sts}='W' and {@COUNT1}<>1 and time({ReportEmpAttendanceView.OTHour})<>time(00,00,00) then
          time(00,00,00) 
      else if {@COUNT1}<>0 then
            time({ReportEmpAttendanceView.OTHour})
     
       else 
          time({ReportEmpAttendanceView.OTHour})

当我使用这个@COUNT1 字段时会出现这里问题。使用这个@COUNT1 字段,超时打印完全符合我的要求。但是当我尝试以打印方式对加班求和时无法总结。@COUNT1 字段如下所示。

Shared Numbervar count1 ;
if ({ReportEmpAttendanceView.Sts}="W") and count1<>0  then
(
    0;
    count1:=0;
)
else if ({ReportEmpAttendanceView.Sts}="W") and count1<>1 and time({ReportEmpAttendanceView.OTHour})<>time(00,00,00) then
(
     1;
    count1:=1;
)

标签: c#crystal-reports-2008

解决方案


推荐阅读