⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 print_kcsptj.pas

📁 pos商场、超市管理系统
💻 PAS
字号:
unit PRINT_KCSPTJ;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  DB, DBTables, QRCTRLS, QUICKRPT, ExtCtrls,QRPrntr,frmmain,myself;

type
  TFrm_print_kcsptj = class(TForm)
    QuickRep_KCSPTJ: TQuickRep;
    TitleBand1: TQRBand;
    QRS_TITLE: TQRSysData;
    QRL_coname: TQRLabel;
    QRExpr13: TQRExpr;
    SummaryBand1: TQRBand;
    QRBand1: TQRBand;
    ColumnHeaderBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel3: TQRLabel;
    QRLabel5: TQRLabel;
    QRLabel7: TQRLabel;
    QRLabel9: TQRLabel;
    PageFooterBand1: TQRBand;
    QRExpr11: TQRExpr;
    QRLabel12: TQRLabel;
    Query_data: TQuery;
    QRL_printdate: TQRLabel;
    QRLabel2: TQRLabel;
    QRE_price: TQRExpr;
    QRE_depotname: TQRExpr;
    QRE_goodsname: TQRExpr;
    QRE_goodstype: TQRExpr;
    QRE_unit: TQRExpr;
    QRE_number: TQRExpr;
    QRExpr7: TQRExpr;
    procedure FormCreate(Sender: TObject);
    procedure QuickRep_KCSPTJPreview(Sender: TObject);
    procedure Query_dataAfterScroll(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Frm_print_kcsptj: TFrm_print_kcsptj;

implementation

uses MAIN_QUERY_KCSPTJ, PRINT_TEMP;

{$R *.dfm}

procedure TFrm_print_kcsptj.FormCreate(Sender: TObject);
begin
  qrl_coname.Caption :=S_name;                                     
  QRL_printdate.Caption :='统计日期:'+formatdatetime('yyyy-mm-dd',now);
    if Frm_main_query_kcsptj.CB_depot.Text='' then
      QRS_TITLE.Text :=QRS_TITLE.Text+'(所有)'
    else
      QRS_TITLE.Text :=QRS_TITLE.Text+'('+Frm_main_query_kcsptj.CB_depot.Text +')';
  with query_data do
  begin
     DatabaseName :=HWSHOPDATA;
     close;
     sql.Clear ;
     SQL.Text :=Frm_main_query_kcsptj.Query_data.SQL.Text ;
     try
        Open ;
     except
        messagedlg(Errormsg0001+'0000',mtError,[mbok],0);
        close;
     end;
  end;
end;

procedure TFrm_print_kcsptj.QuickRep_KCSPTJPreview(Sender: TObject);
begin
   with Tfrm_print_temp.Create(Application) do
   begin
    	QRP_print.QRPrinter := TQRPrinter(Sender);
    	frm_print_temp.CurRep := QuickRep_kcsptj;
      show;
   end;
end;

procedure TFrm_print_kcsptj.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 + -