📄 uyldyzjtz_2.pas
字号:
unit uYLDYZJTZ_2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls, QuickRpt, Db, DBTables, Qrctrls;
type
TfrmYLDYZJTZ_2 = class(TForm)
QuickRep1: TQuickRep;
QRBand1: TQRBand;
QRBand2: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRSysData1: TQRSysData;
ColumnHeaderBand1: TQRBand;
qryReport: TQuery;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel10: TQRLabel;
QRLabel11: TQRLabel;
QRLabel12: TQRLabel;
QRLabel15: TQRLabel;
QRLabel16: TQRLabel;
QRLabel17: TQRLabel;
QRLabel18: TQRLabel;
QRLabel20: TQRLabel;
QRLabel22: TQRLabel;
QRLabel13: TQRLabel;
QRLabel21: TQRLabel;
QRShape1: TQRShape;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRShape13: TQRShape;
QRShape14: TQRShape;
QRShape16: TQRShape;
QRShape17: TQRShape;
QRSysData2: TQRSysData;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
QRDBText3: TQRDBText;
QRDBText4: TQRDBText;
QRDBText5: TQRDBText;
QRDBText6: TQRDBText;
QRDBText7: TQRDBText;
QRDBText8: TQRDBText;
QRDBText10: TQRDBText;
QRDBText11: TQRDBText;
QRDBText12: TQRDBText;
QRDBText13: TQRDBText;
QRDBText14: TQRDBText;
QRDBText15: TQRDBText;
QRDBText17: TQRDBText;
QRDBText18: TQRDBText;
QRShape19: TQRShape;
QRShape20: TQRShape;
QRShape21: TQRShape;
QRShape22: TQRShape;
QRShape23: TQRShape;
QRShape24: TQRShape;
QRShape26: TQRShape;
QRShape27: TQRShape;
QRShape28: TQRShape;
QRShape29: TQRShape;
QRShape30: TQRShape;
QRShape31: TQRShape;
QRShape32: TQRShape;
QRShape34: TQRShape;
QRShape35: TQRShape;
QRShape36: TQRShape;
QRDBText19: TQRDBText;
qryReportDWID: TStringField;
qryReportYJRQ: TDateTimeField;
qryReportBH: TStringField;
qryReportDWDM: TStringField;
qryReportDWMC: TStringField;
qryReportSYHJ: TFloatField;
qryReportJCYLJ_ZJ: TFloatField;
qryReportGDXYLJ_ZJ: TFloatField;
qryReportGRZHYLJ_ZJ: TFloatField;
qryReportHYGDXBT_ZJ: TFloatField;
qryReportTZJ_ZJ: TFloatField;
qryReportHLF_ZJ: TFloatField;
qryReportDFBCLXDY_ZJ: TFloatField;
qryReportJCYLJ_JS: TFloatField;
qryReportGDXYLJ_JS: TFloatField;
qryReportGRZHYLJ_JS: TFloatField;
qryReportHYGDXBT_JS: TFloatField;
qryReportTZJ_JS: TFloatField;
qryReportHLF_JS: TFloatField;
qryReportDFBCLXDY_JS: TFloatField;
qryReportJCYLJ: TFloatField;
qryReportGDXYLJ: TFloatField;
qryReportGRZHYLJ: TFloatField;
qryReportHYGDXBT: TFloatField;
qryReportTZJ: TFloatField;
qryReportHLF: TFloatField;
qryReportDFBCLXDY: TFloatField;
qryReportBYHJ: TFloatField;
procedure QRSysData1Print(sender: TObject; var Value: String);
procedure QRSysData2Print(sender: TObject; var Value: String);
procedure QRDBText19Print(sender: TObject; var Value: String);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmYLDYZJTZ_2: TfrmYLDYZJTZ_2;
implementation
{$R *.DFM}
procedure TfrmYLDYZJTZ_2.QRSysData1Print(sender: TObject; var Value: String);
begin
Value := '第' + Value + '页';
end;
procedure TfrmYLDYZJTZ_2.QRSysData2Print(sender: TObject; var Value: String);
begin
Value := FormatDateTime(LongDateFormat,StrToDate(Value));
end;
procedure TfrmYLDYZJTZ_2.QRDBText19Print(sender: TObject; var Value: String);
var
sTemp,sResult : string;
i : integer;
begin
//存储结果
sResult := '';
//提取年
sTemp := FormatDateTime('YYYY',StrToDate(Value));
for i := 1 to 4 do
begin
case sTemp[i] of
'0' : sResult := sResult + '零';
'1' : sResult := sResult + '一';
'2' : sResult := sResult + '二';
'3' : sResult := sResult + '三';
'4' : sResult := sResult + '四';
'5' : sResult := sResult + '五';
'6' : sResult := sResult + '六';
'7' : sResult := sResult + '七';
'8' : sResult := sResult + '八';
'9' : sResult := sResult + '九';
else continue;//其他的忽略
end;//end case
end;//end for
//加上年
sResult := sResult + '年';
//提取月
sTemp := FormatDateTime('MM',StrToDate(Value));
for i := 1 to 2 do
begin
case sTemp[i] of
'0' : continue;//忽略零
'1' : if i = 1 then
sResult := sResult + '十'
else
sResult := sResult + '一';
'2' : sResult := sResult + '二';
'3' : sResult := sResult + '三';
'4' : sResult := sResult + '四';
'5' : sResult := sResult + '五';
'6' : sResult := sResult + '六';
'7' : sResult := sResult + '七';
'8' : sResult := sResult + '八';
'9' : sResult := sResult + '九';
else continue;//其他的忽略
end;//end case
end;//end for
//加上月
sResult := sResult + '月';
//把sResult赋值给Value
Value := sResult;
end;
procedure TfrmYLDYZJTZ_2.FormShow(Sender: TObject);
begin
self.QuickRep1.Preview;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -