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

📄 sy_jyspnxstjb_rpt1.pas

📁 省级集邮品管理ERP
💻 PAS
字号:
{*******************************************************}
{                                                       }
{            集邮商品业务收入统计表打印                 }
{                                                       }
{            中软金马公司版权所有。2002.12前            }
{                                                       }
{            编制:中软金马邮资票品项目开发组           }
{                                                       }
{                                                       }
{*******************************************************}
(*
省级集邮票管理,地市集邮票

*)
unit SY_JYSPNXSTJB_RPT1;

interface

uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
  StdCtrls, ExtCtrls, Forms, Quickrpt, QRCtrls, Db, DBTables;

type
  TJYSPNXSTJB_RPT1 = class(TQuickRep)
    Qry_Print: TQuery;
    UpdateSQL1: TUpdateSQL;
    PageHeaderBand1: TQRBand;
    QRSysData1: TQRSysData;
    QRLabel37: TQRLabel;
    QRLabel38: TQRLabel;
    QRLabel41: TQRLabel;
    QRLabel42: TQRLabel;
    QRLabel43: TQRLabel;
    QRLabel44: TQRLabel;
    QRLabel45: TQRLabel;
    QRShape1: TQRShape;
    QRShape2: TQRShape;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    QRShape5: TQRShape;
    QRLabel4: TQRLabel;
    QRLabel5: TQRLabel;
    QRShape7: TQRShape;
    QRLabel6: TQRLabel;
    QRLabel7: TQRLabel;
    QRShape11: TQRShape;
    QRLabel8: TQRLabel;
    QRLabel9: TQRLabel;
    QRShape12: TQRShape;
    QRLabel10: TQRLabel;
    QRLabel11: TQRLabel;
    QRShape3: TQRShape;
    QRShape6: TQRShape;
    QRShape15: TQRShape;
    QRShape21: TQRShape;
    QRShape22: TQRShape;
    QRShape23: TQRShape;
    QRShape24: TQRShape;
    QRShape25: TQRShape;
    QRShape26: TQRShape;
    QRShape27: TQRShape;
    QRShape28: TQRShape;
    QRShape29: TQRShape;
    PageFooterBand1: TQRBand;
    QRRichText12: TQRRichText;
    QRShape30: TQRShape;
    QRRichText13: TQRRichText;
    QRShape31: TQRShape;
    QRRichText14: TQRRichText;
    QRShape32: TQRShape;
    QRRichText15: TQRRichText;
    QRShape33: TQRShape;
    QRRichText16: TQRRichText;
    QRShape34: TQRShape;
    QRRichText17: TQRRichText;
    QRShape35: TQRShape;
    QRRichText18: TQRRichText;
    QRShape36: TQRShape;
    QRRichText19: TQRRichText;
    QRShape37: TQRShape;
    QRRichText20: TQRRichText;
    QRShape38: TQRShape;
    QRRichText21: TQRRichText;
    QRRichText22: TQRRichText;
    QRShape40: TQRShape;
    QRShape41: TQRShape;
    QRShape43: TQRShape;
    QRShape44: TQRShape;
    QRShape45: TQRShape;
    DetailBand1: TQRBand;
    QRShape4: TQRShape;
    QRShape8: TQRShape;
    QRShape9: TQRShape;
    QRShape10: TQRShape;
    QRShape13: TQRShape;
    QRShape14: TQRShape;
    QRShape16: TQRShape;
    QRShape17: TQRShape;
    QRShape18: TQRShape;
    QRShape19: TQRShape;
    QRRichText1: TQRRichText;
    QRRichText2: TQRRichText;
    QRRichText3: TQRRichText;
    QRRichText4: TQRRichText;
    QRRichText5: TQRRichText;
    QRRichText6: TQRRichText;
    QRRichText7: TQRRichText;
    QRRichText8: TQRRichText;
    QRRichText9: TQRRichText;
    QRRichText10: TQRRichText;
    QRRichText11: TQRRichText;
    QRShape20: TQRShape;
    QRShape39: TQRShape;
    QRShape42: TQRShape;
    procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
      var PrintReport: Boolean);
    procedure QuickRepNeedData(Sender: TObject; var MoreData: Boolean);
  private

  public
    ND,YF: String;
    TotalPageCount:Integer;
    Tao_Print_Flag:Boolean;
    DetailLines:Integer;
    DataCount:Integer;
    SmallFlag:Boolean;
    sumjypsr,sumjyphj,sumypsr,sumyphj,sumqtsr,sumqthj,summl,summlhj,sum,sumhj:Double;
  end;

var
  JYSPNXSTJB_RPT1: TJYSPNXSTJB_RPT1;

implementation

{$R *.DFM}

procedure TJYSPNXSTJB_RPT1.QuickRepBeforePrint(Sender: TCustomQuickRep;
  var PrintReport: Boolean);
begin
  DetailLines:=0;
  sumjypsr:=0;
  sumjyphj:=0;
  sumypsr:=0;
  sumyphj:=0;;
  sumqtsr:=0;
  sumqthj:=0;
  summl:=0;
  summlhj:=0;
  sum:=0;
  sumhj:=0;
  Qry_Print.Close;
  Qry_Print.ParamByName('ND').AsString := ND;
  Qry_Print.ParamByName('YF').AsString := YF;
  Qry_print.Open;
end;

procedure TJYSPNXSTJB_RPT1.QuickRepNeedData(Sender: TObject;
  var MoreData: Boolean);
begin
    if DetailLines=22 then
      DetailLines:=1;

    if DetailLines<=21 then
    begin
      Inc(DetailLines);
      MoreData:=True;
    end;


  if not Qry_Print.Eof then
  begin
    DetailBand1.Height := 28 ;
    if Qry_Print.FieldByName('dwmc').AsString='合计' then
    begin
      QRRichText12.lines.Text :=Qry_Print.FieldByName('dwmc').AsString;
      QRRichText13.Lines.Text :=FormatFloat('#,##',Qry_Print.fieldbyname('jypsr').asFloat);
      QRRichText14.Lines.Text :=FormatFloat('#,##',Qry_Print.fieldbyname('jypsrhj').asFloat);
      QRRichText15.Lines.Text :=FormatFloat('#,##',Qry_Print.fieldbyname('ypsr').asFloat);
      QRRichText16.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('ypsrhj').asFloat);
      QRRichText17.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('qtsr').asFloat);
      QRRichText18.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('qtsrhj').asFloat);
      QRRichText19.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('ml').asFloat);
      QRRichText20.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('mlhj').asFloat);
      QRRichText21.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('hj').asFloat);
      QRRichText22.lines.Text:= FormatFloat('#,##',Qry_Print.fieldbyname('hjhj').asFloat);

      QRRichText1.Lines.Text := '';
      QRRichText3.Lines.Text := '';
      QRRichText11.Lines.Text := '';
      QRRichText4.Lines.Text := '';
      QRRichText5.Lines.Text :='';
      QRRichText6.Lines.Text := '';
      QRRichText7.Lines.Text := '';
      QRRichText9.Lines.Text := '';
      QRRichText8.Lines.Text :='';
      QRRichText10.Lines.Text := '';
      QRRichText2.Lines.text:='';
    end
    else begin
      QRRichText1.lines.Text :=Qry_Print.FieldByName('dwmc').AsString;
      QRRichText2.Lines.Text :=FormatFloat('#,##',Qry_Print.fieldbyname('jypsr').asFloat);
      QRRichText3.Lines.Text :=FormatFloat('#,##',Qry_Print.fieldbyname('jypsrhj').asFloat);
      QRRichText4.Lines.Text :=FormatFloat('#,##',Qry_Print.fieldbyname('ypsr').asFloat);
      QRRichText5.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('ypsrhj').asFloat);
      QRRichText6.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('qtsr').asFloat);
      QRRichText7.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('qtsrhj').asFloat);
      QRRichText8.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('ml').asFloat);
      QRRichText9.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('mlhj').asFloat);
      QRRichText10.Lines.Text := FormatFloat('#,##',Qry_Print.fieldbyname('hj').asFloat);
      QRRichText11.lines.Text:= FormatFloat('#,##',Qry_Print.fieldbyname('hjhj').asFloat);

      sumjypsr:=Sumjypsr+Qry_Print.fieldbyname('jypsr').asFloat;
      sumjyphj:=Sumjyphj+Qry_Print.fieldbyname('jypsrhj').asFloat;
      sumypsr:=Sumypsr+Qry_Print.fieldbyname('ypsr').asFloat;
      sumyphj:=Sumyphj+Qry_Print.fieldbyname('ypsrhj').asFloat;
      sumqtsr:=Sumqtsr+Qry_Print.fieldbyname('qtsr').asFloat;
      sumqthj:=Sumqthj+Qry_Print.fieldbyname('qtsrhj').asFloat;
      summl:=Summl+Qry_Print.fieldbyname('ml').asFloat;
      summlhj:=Summlhj+Qry_Print.fieldbyname('mlhj').asFloat;
      sum:=Sum+Qry_Print.fieldbyname('hj').asFloat;
      sumhj:=Sumhj+Qry_Print.fieldbyname('hjhj').asFloat;

      QRRichText12.lines.Text :='合  计';
      QRRichText13.Lines.Text :=FormatFloat('#,##',sumjypsr);
      QRRichText14.Lines.Text :=FormatFloat('#,##',sumjyphj);
      QRRichText15.Lines.Text :=FormatFloat('#,##',sumypsr);
      QRRichText16.Lines.Text :=FormatFloat('#,##',sumyphj);
      QRRichText17.Lines.Text :=FormatFloat('#,##', sumqtsr);
      QRRichText18.Lines.Text := FormatFloat('#,##',sumqthj);
      QRRichText19.Lines.Text := FormatFloat('#,##',summl);
      QRRichText20.Lines.Text := FormatFloat('#,##',summlhj);
      QRRichText21.Lines.Text :=FormatFloat('#,##', sum);
      QRRichText22.lines.Text:= FormatFloat('#,##',sumhj);

    end;
  end;

  if MoreData and (Qry_Print.Eof) then
  begin
      QRRichText1.Lines.Text := '';
      QRRichText3.Lines.Text := '';
      QRRichText11.Lines.Text := '';
      QRRichText4.Lines.Text := '';
      QRRichText5.Lines.Text :='';
      QRRichText6.Lines.Text := '';
      QRRichText7.Lines.Text := '';
      QRRichText9.Lines.Text := '';
      QRRichText8.Lines.Text :='';
      QRRichText10.Lines.Text := '';
      QRRichText2.Lines.text:='';
      if DetailLines=21 then
       MoreData:=False;
  end;

  if (not Qry_Print.Eof) then
  begin
      MoreData:= not Qry_Print.eof;
      Qry_Print.Next;
  end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -