?? jm_ydmxdy.pas
字號:
{*******************************************************}
{ }
{ 營業員預訂情況打印 }
{ }
{ 中軟金馬公司版權所有。2002.12前 }
{ }
{ 編制:中軟金馬郵資票品項目開發組 }
{ }
{ }
{*******************************************************}
(*
本模塊在地市集郵票管理,地市集郵品管理,地市市場購入票里面調用。
*)
unit JM_YDMXDY;
interface
uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Forms, Quickrpt, QRCtrls, Dialogs, Db, DBTables;
const
c_totoline = 28;
type
Tfrm_ydmxdy = class(TQuickRep)
PageHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel6: TQRLabel;
QRLabel25: TQRLabel;
PageFooterBand1: TQRBand;
QRLabel30: TQRLabel;
ColumnHeaderBand1: TQRBand;
QRLabel19: TQRLabel;
QRLabel3: TQRLabel;
DetailBand1: TQRBand;
QRShape1: TQRShape;
QRShape2: TQRShape;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape8: TQRShape;
QRShape12: TQRShape;
QRShape17: TQRShape;
QRShape21: TQRShape;
QRShape24: TQRShape;
QRShape25: TQRShape;
QRShape27: TQRShape;
QRLabel2: TQRLabel;
QRLabel28: TQRLabel;
QRLabel29: TQRLabel;
QRSysData1: TQRSysData;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel10: TQRLabel;
QRLabel11: TQRLabel;
QRLabel12: TQRLabel;
QRLabel13: TQRLabel;
QRLabel14: TQRLabel;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRShape11: TQRShape;
QRShape13: TQRShape;
QRShape14: TQRShape;
QRShape16: TQRShape;
QRShape18: TQRShape;
QRShape19: TQRShape;
QRShape20: TQRShape;
QRShape22: TQRShape;
QRLabel15: TQRLabel;
QRLabel16: TQRLabel;
QRLabel17: TQRLabel;
QRLabel18: TQRLabel;
QRLabel20: TQRLabel;
QRLabel21: TQRLabel;
QRLabel22: TQRLabel;
QRShape34: TQRShape;
QRShape33: TQRShape;
QRShape35: TQRShape;
QRLabel23: TQRLabel;
QRLabel24: TQRLabel;
QRShape7: TQRShape;
procedure QuickRepNeedData(Sender: TObject; var MoreData: Boolean);
procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
procedure QuickRepStartPage(Sender: TCustomQuickRep);
private
public
nheight: integer;
DetailLines: Integer;
end;
var
frm_ydmxdy: Tfrm_ydmxdy;
implementation
uses JM_YDMXCX;
{$R *.DFM}
procedure Tfrm_ydmxdy.QuickRepNeedData(Sender: TObject;
var MoreData: Boolean);
begin
if DetailLines = c_totoline + 1 then
DetailLines := 1;
if DetailLines <= c_totoline then
begin
Inc(DetailLines);
MoreData := True;
end;
if not Frm_YDMXCX.RQry_pnt.Eof then
begin
QRLabel5.Caption := Frm_YDMXCX.RQry_pnt.fieldByName('YDLXMC').asstring;
QRLabel7.Caption := Frm_YDMXCX.RQry_pnt.fieldByName('LSH').asstring;
QRLabel8.Caption := formatfloat('#,##', Frm_YDMXCX.RQry_pnt.fieldByName('HS').asFloat);
QRLabel15.Caption := formatfloat('#,##', Frm_YDMXCX.RQry_pnt.fieldByName('SL').asFloat);
QRLabel16.Caption := formatfloat('#,##0.00##', Frm_YDMXCX.RQry_pnt.fieldByName('YFK').asFloat);
QRLabel17.Caption := formatfloat('#,##0.00##', Frm_YDMXCX.RQry_pnt.fieldByName('GBF').asFloat);
QRLabel18.Caption := formatfloat('#,##0.00##', Frm_YDMXCX.RQry_pnt.fieldByName('QTFY').asFloat);
QRLabel20.Caption := formatfloat('#,##0.00##', Frm_YDMXCX.RQry_pnt.fieldByName('FYHJ').asFloat);
QRLabel24.Caption := formatfloat('#,##0.00##', Frm_YDMXCX.RQry_pnt.fieldByName('BZJ').asFloat);
DetailBand1.Height := 30;
end;
if MoreData and (Frm_YDMXCX.RQry_pnt.Eof) then
begin
QRLabel5.Caption := '';
QRLabel7.Caption := '';
QRLabel8.Caption := '';
QRLabel15.Caption := '';
QRLabel16.Caption := '';
QRLabel17.Caption := '';
QRLabel18.Caption := '';
QRLabel20.Caption := '';
QRLabel24.Caption := '';
if DetailLines = c_totoline + 1 then
MoreData := False;
end;
if (not Frm_YDMXCX.RQry_pnt.Eof) then
begin
MoreData := not Frm_YDMXCX.RQry_pnt.eof;
Frm_YDMXCX.RQry_pnt.Next;
end;
end;
procedure Tfrm_ydmxdy.QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
Frm_YDMXCX.RQry_pnt.First;
end;
procedure Tfrm_ydmxdy.QuickRepStartPage(Sender: TCustomQuickRep);
var
i: integer;
begin
{ for I := 0 to PageHeaderBand1.ControlCount - 1 do //設置頁頭的套打
begin
if PageHeaderBand1.Controls[I] is TQRLabel then
TQRLabel(PageHeaderBand1.Controls[I]).Enabled := True;
if PageHeaderBand1.Controls[I] is TQRShape then
TQRShape(PageHeaderBand1.Controls[i]).Enabled := True;
end;
for I := 0 to ColumnHeaderBand1.ControlCount - 1 do //設置表頭的套打
begin
if ColumnHeaderBand1.Controls[I] is TQRShape then
TQRShape(ColumnHeaderBand1.Controls[I]).Enabled := True;
if ColumnHeaderBand1.Controls[I] is TQRLabel then
TQRLabel(ColumnHeaderBand1.Controls[I]).Enabled := True;
end;
for I := 0 to DetailBand1.ControlCount - 1 do //設置表內容的套打
begin
if DetailBand1.Controls[I] is TQRShape then
TQRShape(DetailBand1.Controls[I]).Enabled := True;
end;
for i := 0 to PageFooterBand1.ControlCount - 1 do //設置頁尾的套打
begin
if PageFooterBand1.Controls[I] is TQRLabel then
TQRLabel(PageFooterBand1.Controls[I]).Enabled := True;
if PageFooterBand1.Controls[I] is TQRShape then
TQRShape(PageFooterBand1.Controls[I]).Enabled := True;
if PageFooterBand1.Controls[i] is TQRRichText then
begin
if IntToStr(Printer.PageNumber) = QRLabel29.caption then
TQRRichText(PageFooterBand1.Controls[I]).Enabled := True
else
TQRRichText(PageFooterBand1.Controls[I]).Enabled := False;
end;
end;
}
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -