?? print_spjxcmx.pas
字號(hào):
unit PRINT_SPJXCMX;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
DB, DBTables, QRCTRLS, QUICKRPT, ExtCtrls,QRPrntr,myself,frmmain;
type
TFrm_print_spjxcmx = class(TForm)
Query_DATA: TQuery;
QuickRep_spjxcmx: TQuickRep;
DetailBand1: TQRBand;
QRE_username: TQRExpr;
QRE_date: TQRExpr;
QRE_depot: TQRExpr;
QRE_name: TQRExpr;
QRE_type: TQRExpr;
QRE_num: TQRExpr;
QRE_price: TQRExpr;
QRE_jxc: TQRExpr;
QRE_memo: TQRExpr;
PageFooterBand1: TQRBand;
QRExpr11: TQRExpr;
QRLabel12: TQRLabel;
TitleBand1: TQRBand;
QRS_TITLE: TQRSysData;
QRL_coname: TQRLabel;
QRExpr13: TQRExpr;
QRL_printdate: TQRLabel;
ColumnHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel2: TQRLabel;
QRLabel5: TQRLabel;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel11: TQRLabel;
QRLabel9: TQRLabel;
procedure FormCreate(Sender: TObject);
procedure QuickRep_spjxcmxPreview(Sender: TObject);
procedure Query_DATAAfterScroll(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frm_print_spjxcmx: TFrm_print_spjxcmx;
implementation
uses MAIN_QUERY_SPJXCMX, PRINT_TEMP;
{$R *.dfm}
procedure TFrm_print_spjxcmx.FormCreate(Sender: TObject);
begin
qrl_coname.Caption :=S_name;
QRL_printdate.Caption :='統(tǒng)計(jì)日期:'+formatdatetime('yyyy-mm-dd',frm_main_query_SPJXCMX.DTP_begin.DateTime)
+' 至 '+formatdatetime('yyyy-mm-dd',frm_main_query_SPJXCMX.DTP_end.DateTime);
if frm_main_query_SPJXCMX.CB_DEPOT.Text='' then
QRS_TITLE.Text :=QRS_TITLE.Text+'(所有)'
else
QRS_TITLE.Text :=QRS_TITLE.Text+'('+frm_main_query_SPJXCMX.CB_DEPOT.Text +')';
with query_data do
begin
DatabaseName :=HWSHOPDATA;
close;
sql.Clear ;
SQL.Text :=frm_main_query_SPJXCMX.Query_data.SQL.Text ;
try
Open ;
except
messagedlg(Errormsg0001+'0000',mtError,[mbok],0);
close;
end;
end;
end;
procedure TFrm_print_spjxcmx.QuickRep_spjxcmxPreview(Sender: TObject);
begin
with Tfrm_print_temp.Create(Application) do
begin
QRP_print.QRPrinter := TQRPrinter(Sender);
frm_print_temp.CurRep := QuickRep_spjxcmx;
show;
end;
end;
procedure TFrm_print_spjxcmx.Query_DATAAfterScroll(DataSet: TDataSet);
begin
if (trim(QRE_jxc.Value.strResult)='進(jìn)貨退貨') or (trim(QRE_jxc.Value.strResult)='銷售退貨') then
begin
QRE_depot.Font.Color :=clred;
QRE_date.Font.Color :=clred;
QRE_jxc.Font.Color :=clred;
QRE_name.Font.Color :=clred;
QRE_type.Font.Color :=clred;
QRE_num.Font.Color :=clred;
QRE_price.Font.Color :=clred;
QRE_username.Font.Color :=clred;
QRE_memo.Font.Color :=clred;
end
else if (trim(QRE_jxc.Value.strResult)='進(jìn)貨') or (trim(QRE_jxc.Value.strResult)='期初') then
begin
QRE_depot.Font.Color :=clblue;
QRE_date.Font.Color :=clblue;
QRE_jxc.Font.Color :=clblue;
QRE_name.Font.Color :=clblue;
QRE_type.Font.Color :=clblue;
QRE_num.Font.Color :=clblue;
QRE_price.Font.Color :=clblue;
QRE_username.Font.Color :=clblue;
QRE_memo.Font.Color :=clblue;
end
else
begin
QRE_depot.Font.Color :=clWindowText;
QRE_date.Font.Color :=clWindowText;
QRE_jxc.Font.Color :=clWindowText;
QRE_name.Font.Color :=clWindowText;
QRE_type.Font.Color :=clWindowText;
QRE_num.Font.Color :=clWindowText;
QRE_price.Font.Color :=clWindowText;
QRE_username.Font.Color :=clWindowText;
QRE_memo.Font.Color :=clWindowText;
end;
end;
end.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -