各位仁兄,愚弟有急事想求:在DELPHI 6 中,做考勤报表查询统计,报表查询统计都正常,我想把统计结果(如LATE代表迟到,整型,假如统计为10分钟)显示于主界面一目了然。我只做出了查询总记录数,而其他卡住,下面是部分源程序,望指教,先谢了!!在线等待... lbrecords.Caption:=inttostr(report.recordcount);//ok
self.Caption:='共查询'+''+inttostr(report.recordcount)+''+'条记录';//ok
//////////////////////////////////////////////
Report.DataSet.first;
//while not report.DataSet.Eof DO
for icount:=0 to report.DataSet.RecordCount-1 do
begin
p:=report.DataSet.Fieldbyname('late').asinteger;
if p>0 then
begin
//Report.DataSet.first;
//p:=report.DataSet.fieldbyname('late').asinteger;
j:=0;
j:=j+p;
Report.DataSet.Next;
end;
//Report.DataSet.Next; lblates.Caption:=inttostr(j);
///////////////////////////////////
self.Caption:='共查询'+''+inttostr(report.recordcount)+''+'条记录';//ok
//////////////////////////////////////////////
Report.DataSet.first;
//while not report.DataSet.Eof DO
for icount:=0 to report.DataSet.RecordCount-1 do
begin
p:=report.DataSet.Fieldbyname('late').asinteger;
if p>0 then
begin
//Report.DataSet.first;
//p:=report.DataSet.fieldbyname('late').asinteger;
j:=0;
j:=j+p;
Report.DataSet.Next;
end;
//Report.DataSet.Next; lblates.Caption:=inttostr(j);
///////////////////////////////////
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货