📄 printscxsunit.pas
字号:
unit PrintscxsUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRCtrls, QuickRpt, ExtCtrls, DB, DBTables, QRPrntr;
type
TPrintscxsForm = class(TForm)
QuickRep_scxsmx: TQuickRep;
DetailBand1: TQRBand;
QRE_peoplename: TQRExpr;
QRE_date: TQRExpr;
QRE_depotname: TQRExpr;
QRE_goodsname: TQRExpr;
QRE_type: TQRExpr;
QRE_unit: TQRExpr;
QRE_number: TQRExpr;
QRE_selldj: TQRExpr;
QRE_price: TQRExpr;
QRE_memo: TQRExpr;
PageFooterBand1: TQRBand;
QRExpr11: TQRExpr;
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;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel10: TQRLabel;
QRBand1: TQRBand;
QRExpr12: TQRExpr;
Query_data: TQuery;
procedure FormCreate(Sender: TObject);
procedure QuickRep_scxsmxPreview(Sender: TObject);
procedure Query_dataAfterScroll(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
PrintscxsForm: TPrintscxsForm;
implementation
uses MainUnit, QueryscSellUnit, PrintBassUnit, FunctionUnit;
{$R *.dfm}
procedure TPrintscxsForm.FormCreate(Sender: TObject);
begin
qrl_coname.Caption := S_name;
QRL_printdate.Caption := '统计日期:' + formatdatetime('yyyy-mm-dd', QueryscSellForm.DTP_begin.DateTime)
+ ' 至 ' + formatdatetime('yyyy-mm-dd', QueryscSellForm.DTP_end.DateTime);
if QueryscSellForm.CB_depot.Text = '' then
QRS_TITLE.Text := QRS_TITLE.Text + '(所有)'
else
QRS_TITLE.Text := QRS_TITLE.Text + '(' + QueryscSellForm.CB_depot.Text + ')';
with query_data do
begin
DatabaseName := 'CPXSGL';
close;
sql.Clear;
SQL.Text := QueryscSellForm.Query_data.SQL.Text;
try
if not (Sql.Text = '') then Open;
except
messagedlg(Errormsg0001 + '0000', mtError, [mbok], 0);
close;
end;
end;
end;
procedure TPrintscxsForm.QuickRep_scxsmxPreview(Sender: TObject);
begin
with TPrintBassForm.Create(Application) do
begin
QRP_print.QRPrinter := TQRPrinter(Sender);
show;
end;
end;
procedure TPrintscxsForm.Query_dataAfterScroll(DataSet: TDataSet);
begin
if QRE_number.Value.intResult < 0 then
begin
QRE_peoplename.Font.Color := clred;
qre_date.Font.Color := clred;
qre_depotname.Font.Color := clred;
qre_goodsname.Font.Color := clred;
qre_type.Font.Color := clred;
QRE_unit.Font.Color := clred;
qre_number.Font.Color := clred;
QRE_selldj.Font.Color := clred;
qre_price.Font.Color := clred;
QRE_memo.Font.Color := clred;
end
else
begin
QRE_peoplename.Font.Color := clWindowText;
qre_date.Font.Color := clWindowText;
qre_depotname.Font.Color := clWindowText;
qre_goodsname.Font.Color := clWindowText;
qre_type.Font.Color := clWindowText;
QRE_unit.Font.Color := clWindowText;
qre_number.Font.Color := clWindowText;
QRE_selldj.Font.Color := clWindowText;
qre_price.Font.Color := clWindowText;
QRE_memo.Font.Color := clWindowText;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -