?? print_ckjhtj.pas
字號:
unit PRINT_CKJHTJ;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
DB, DBTables, QRCTRLS, QUICKRPT, ExtCtrls,QRPrntr,frmmain,myself;
type
TFrm_print_ckjhtj = class(TForm)
QuickRep_ckjhtj: TQuickRep;
PageFooterBand1: TQRBand;
QRExpr11: TQRExpr;
QRLabel12: TQRLabel;
TitleBand1: TQRBand;
QRL_coname: TQRLabel;
QRS_TITLE: TQRSysData;
QRExpr13: TQRExpr;
QRL_printdate: TQRLabel;
ColumnHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel3: TQRLabel;
QRLabel5: TQRLabel;
QRLabel7: TQRLabel;
QRLabel9: TQRLabel;
QRBand1: TQRBand;
QRE_depotname: TQRExpr;
QRE_goodsname: TQRExpr;
QRE_goodstype: TQRExpr;
QRE_number: TQRExpr;
QRE_price: TQRExpr;
SummaryBand1: TQRBand;
QRExpr7: TQRExpr;
Query_data: TQuery;
QRLabel2: TQRLabel;
QRE_unit: TQRExpr;
procedure FormCreate(Sender: TObject);
procedure QuickRep_ckjhtjPreview(Sender: TObject);
procedure Query_dataAfterScroll(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_print_ckjhtj: TFrm_print_ckjhtj;
implementation
uses MAIN_QUERY_CKJHTJ, PRINT_TEMP;
{$R *.dfm}
procedure TFrm_print_ckjhtj.FormCreate(Sender: TObject);
begin
qrl_coname.Caption :=S_name;
QRL_printdate.Caption :='統計日期:'+formatdatetime('yyyy-mm-dd',Frm_main_query_ckjhtj.DTP_begin.DateTime)
+' 至 '+formatdatetime('yyyy-mm-dd',Frm_main_query_ckjhtj.DTP_end.DateTime);
if Frm_main_query_ckjhtj.CB_depot.Text='' then
QRS_TITLE.Text :=QRS_TITLE.Text+'(所有)'
else
QRS_TITLE.Text :=QRS_TITLE.Text+'('+Frm_main_query_ckjhtj.CB_depot.Text +')';
with query_data do
begin
DatabaseName :=HWSHOPDATA;
close;
sql.Clear ;
SQL.Text :=Frm_main_query_ckjhtj.Query_data.SQL.Text ;
try
Open ;
except
messagedlg(Errormsg0001+'0000',mtError,[mbok],0);
close;
end;
end;
end;
procedure TFrm_print_ckjhtj.QuickRep_ckjhtjPreview(Sender: TObject);
begin
with Tfrm_print_temp.Create(Application) do
begin
QRP_print.QRPrinter := TQRPrinter(Sender);
frm_print_temp.CurRep := QuickRep_ckjhtj;
show;
end;
end;
procedure TFrm_print_ckjhtj.Query_dataAfterScroll(DataSet: TDataSet);
begin
if qre_number.Value.dblResult < 0 then
begin
QRE_depotname.Font.Color :=clred;
qre_goodsname.Font.Color :=clred;
qre_goodstype.Font.Color :=clred;
QRE_unit.Font.Color :=clred;
qre_number.Font.Color :=clred;
qre_price.Font.Color :=clred;
end
else
begin
QRE_depotname.Font.Color :=clWindowText;
qre_goodsname.Font.Color :=clWindowText;
qre_goodstype.Font.Color :=clWindowText;
QRE_unit.Font.Color :=clWindowText;
qre_number.Font.Color :=clWindowText;
qre_price.Font.Color :=clWindowText;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -