📄 trrepfrm0.pas
字号:
unit TrRepFrm0;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, QuickRpt, qrprntr, Qrctrls, Db, DbTables;
type
TForm_TrRep0 = class(TForm)
QuickRep1: TQuickRep;
PageFooterBand1: TQRBand;
TitleBand1: TQRBand;
QRLabel1: TQRLabel;
QRShape1: TQRShape;
QRShape3: TQRShape;
QRLabel22: TQRLabel;
QRSysData1: TQRSysData;
QRLabel37: TQRLabel;
QRLabel38: TQRLabel;
QRLabel39: TQRLabel;
QRLabel40: TQRLabel;
QRShape2: TQRShape;
QRShape4: TQRShape;
QRLabel2: TQRLabel;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel10: TQRLabel;
procedure QuickRep1Preview(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
SelStartDateTime,SelEndDateTime:TDateTime;
public
{ Public declarations }
function SqlOpen(anyqry:TQuery;sqlstr:string):string;
end;
var
Form_TrRep0: TForm_TrRep0;
implementation
uses prgramstaticFrm0, MyPreviewFrm, SystemDM;
{$R *.DFM}
function TForm_TrRep0.SqlOpen(anyqry:TQuery;sqlstr:string):string;
begin
result:='0';
with anyqry do
begin
close; sql.clear; sql.text:=sqlstr; prepare;
SelStartDateTime:=Form_prgramstatic0.DatePicker_Start.date;
SelEndDateTime:=Form_prgramstatic0.DatePicker_End.date;
replacetime(SelStartDateTime,Form_prgramstatic0.TimePicker_Start.time);
replacetime(SelEndDateTime,Form_prgramstatic0.TimePicker_End.time);
ParamByName('Start').asdatetime:=SelStartDateTime;
ParamByName('End').asdatetime:=SelEndDateTime;
open;
result:=IntToStr(RecordCount);
end;
end;
procedure TForm_TrRep0.QuickRep1Preview(Sender: TObject);
begin
with TMyPreview.Create(application) do
begin
QRPreview1.QRPrinter := TQRPrinter(sender);
CurRep := self.QuickRep1;
Show;
end;
end;
procedure TForm_TrRep0.FormCreate(Sender: TObject);
begin
QRLabel1.Caption:='纪委行风办审批统计 ( 月统计)';
QRLabel7.Caption:='0'; QRLabel8.Caption:='0'; QRLabel9.Caption:='0'; QRLabel10.Caption:='0';
QRLabel10.Caption:=sqlopen(SysDM.Qry_Gzbx,'select * from ClientElecOut where zzsbsj>=:Start and zzsbsj<=:End');
QRLabel8.Caption:=sqlopen(SysDM.Qry_Gzbx,'select * from ClientElecOut where datediff(hour,zzflsj,getdate())>12 and state=0 and zzsbsj>=:Start and zzsbsj<=:End');
QRLabel7.Caption:=sqlopen(SysDM.Qry_Gzbx,'select * from ClientElecOut where state=7 and zzsbsj>=:Start and zzsbsj<=:End');
QRLabel9.Caption:=IntToStr(StrToInt(QRLabel10.Caption)-StrToInt(QRLabel8.Caption)-StrToInt(QRLabel7.Caption));
QRLabel38.Caption:=DateTimeToStr(SelStartDateTime); QRLabel40.Caption:=DateTimeToStr(SelEndDateTime);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -