?? sy_ckjhdmore_more_rpt.pas
字號:
{*******************************************************}
{ }
{ 出庫計劃單打印 }
{ }
{ 中軟金馬公司版權(quán)所有。2002.12前 }
{ }
{ 編制:中軟金馬項目開發(fā)組 }
{ }
{ }
{*******************************************************}
(*
本模塊在省級集郵票管理、省級集郵品管理、省級零枚票管理、
地市集郵票管理、地市集郵品管理五個模塊調(diào)用
修改記錄
修改,進價銷價結(jié)算價結(jié)算金額顯示小數(shù)點后3位 jhshao 2003.05.08
*)
unit SY_CKJHDMore_More_RPT;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
QuickRpt, Qrctrls, ExtCtrls, QRLine, Db, DBTables;
type
TFrm_More_More_RPT = class(TQuickRep)
DetailBand1: TQRBand;
PageFooterBand1: TQRBand;
PageHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRShape1: TQRShape;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
ColumnHeaderBand1: TQRBand;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRShape9: TQRShape;
QRLabel10: TQRLabel;
QRLabel11: TQRLabel;
QRLabel12: TQRLabel;
QRLabel13: TQRLabel;
QRLabel14: TQRLabel;
QRLabel15: TQRLabel;
QRLine1: TQRLine;
QRLabel9: TQRLabel;
QRLabel8: TQRLabel;
QRShape10: TQRShape;
QRRichText1: TQRRichText;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRShape13: TQRShape;
QRRichText2: TQRRichText;
QRRichText3: TQRRichText;
QRShape14: TQRShape;
QRRichText4: TQRRichText;
QRShape15: TQRShape;
QRRichText5: TQRRichText;
QRShape16: TQRShape;
QRShape17: TQRShape;
QRRichText6: TQRRichText;
QRRichText7: TQRRichText;
QRShape18: TQRShape;
QRShape19: TQRShape;
QRLabel16: TQRLabel;
QRLabel17: TQRLabel;
QRLabel18: TQRLabel;
Qry_Print: TQuery;
QRRichText8: TQRRichText;
QRLabel19: TQRLabel;
QRShape20: TQRShape;
QRShape21: TQRShape;
QRSysData1: TQRSysData;
QRLabel20: TQRLabel;
QRLabel21: TQRLabel;
procedure QuickRepNeedData(Sender: TObject; var MoreData: Boolean);
procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
procedure QuickRepStartPage(Sender: TCustomQuickRep);
private
{ Private declarations }
public
{ Public declarations }
DetailLines: Integer;
Tao_Print_Flag: Boolean;
end;
var
Frm_More_More_RPT: TFrm_More_More_RPT;
implementation
uses SJ_RichEdit;
{$R *.DFM}
procedure TFrm_More_More_RPT.QuickRepNeedData(Sender: TObject;
var MoreData: Boolean);
begin
if DetailLines <= 34 then
begin
Inc(Detaillines);
MoreData := True;
end;
if not Qry_print.Eof then
begin
Frm_RichEdit.RichEdit1.Width := QRRichText3.Width;
Frm_richEdit.RichEdit1.Lines.Clear;
Frm_richEdit.RichEdit1.Lines.Text := Qry_Print.FieldByName('ppmc').AsString;
QRRichText3.Lines.Text := Frm_richEdit.RichEdit1.Lines.Text;
if QRRichText3.Lines.Count > 1 then
begin
QRRichText3.Font.Size := 9;
if QRRichText3.Lines.Count > 1 then
QRRichText3.Top := -2
else
QRRichText3.Top := 1;
end
else
begin
QRRichText3.Font.Size := 11;
QRRichText3.Top := 1;
end;
Frm_RichEdit.RichEdit1.Width := QRRichText2.Width;
Frm_richEdit.RichEdit1.Lines.Clear;
Frm_richEdit.RichEdit1.Lines.Text := Qry_print.FieldByName('zh').AsString;
QRRichText2.Lines.Text := Frm_richEdit.RichEdit1.Lines.Text;
if QRRichText2.Lines.Count > 1 then
begin
QRRichText2.Font.Size := 9;
if QRRichText2.Lines.Count > 1 then
QRRichText2.Top := 1
else
QRRichText2.Top := -2;
end
else
begin
QRRichText2.Font.Size := 11;
QRRichText2.Top := 1;
end;
QRRichTExt1.Lines.Text := Qry_Print.FieldbyName('dwmc').AsString;
QrRichText2.Lines.Text := Qry_Print.fieldbyName('zh').AsString;
QrRichText3.Lines.Text := Qry_Print.fieldbyName('ppmc').AsString;
{修改,進價和銷價顯示小數(shù)點后3位 原來的#,##0.00替換為#,##0.000 jhshao 2003.05.08}
QrRichText4.Lines.Text := Formatfloat('#,##0.000', Qry_Print.fieldbyName('jj').Asfloat);
QrRichText5.Lines.Text := FormatFloat('#,##0.000', Qry_Print.fieldbyName('xj').AsFloat);
QrRichText7.Lines.Text := FormatFloat('#,##0.000', Qry_Print.fieldbyName('je').AsFloat);
QRRichText8.Lines.Text := FormatFloat('#,##0.000', Qry_Print.fieldbyName('jsj').AsFloat);
QrRichText6.Lines.Text := FormatFloat('#,##', Qry_Print.fieldbyName('fpsl').AsFloat);
end;
if MoreData and Qry_Print.eof then
begin
QRRichTExt1.Lines.Text := '';
QrRichText2.Lines.Text := '';
QrRichText3.Lines.Text := '';
QrRichText4.Lines.Text := '';
QrRichText5.Lines.Text := '';
QrRichText6.Lines.Text := '';
QrRichText7.Lines.Text := '';
QRRichText8.Lines.Text := '';
if Detaillines = 35 then
MoreData := False;
end;
if not Qry_Print.Eof then
begin
MoreData := not Qry_Print.Eof;
Qry_print.Next;
end;
if DetailLines = 35 then
DetailLines := 0;
end;
procedure TFrm_More_More_RPT.QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
Qry_Print.First;
DetailLines := 0;
end;
procedure TFrm_More_More_RPT.QuickRepStartPage(Sender: TCustomQuickRep);
var
i: integer;
begin
for I := 0 to PageHeaderBand1.ControlCount - 1 do //設(shè)置頁頭的套打
begin
if PageHeaderBand1.Controls[I] is TQRLabel then
begin
if Tao_Print_Flag then
begin
TQRLabel(PageHeaderBand1.Controls[I]).Enabled := False;
if (PageHeaderBand1.Controls[I].Name = 'QRLabel1') or
(PageHeaderBand1.Controls[I].Name = 'QRLabel5') or
(PageHeaderBand1.Controls[I].Name = 'QRLabel4') or
(PageHeaderBand1.Controls[I].Name = 'QRLabel21') then
TQRLabel(PageHeaderBand1.Controls[I]).Enabled := True;
end
else
TQRLabel(PageHeaderBand1.Controls[I]).Enabled := True;
end;
if PageHeaderBand1.Controls[I] is TQRShape then
if Tao_Print_Flag then
TQRShape(PageHeaderBand1.Controls[i]).Enabled := False
else
TQRShape(PageHeaderBand1.Controls[i]).Enabled := True;
end;
for I := 0 to ColumnHeaderBand1.ControlCount - 1 do //設(shè)置表頭的套打
begin
if ColumnHeaderBand1.Controls[I] is TQRShape then
begin
if Tao_Print_Flag then
TQRShape(ColumnHeaderBand1.Controls[I]).Enabled := False
else
TQRShape(ColumnHeaderBand1.Controls[I]).Enabled := True;
end;
if ColumnHeaderBand1.Controls[I] is TQRLabel then
begin
if Tao_Print_Flag then
TQRLabel(ColumnHeaderBand1.Controls[I]).Enabled := False
else
TQRLabel(ColumnHeaderBand1.Controls[I]).Enabled := True;
end;
if ColumnHeaderBand1.Controls[i] is TQRline then
if Tao_Print_Flag then
TQRLine(ColumnHeaderBand1.Controls[i]).Enabled := False
else
TQRLine(ColumnHeaderBand1.Controls[i]).Enabled := True;
end;
for I := 0 to DetailBand1.ControlCount - 1 do //設(shè)置表內(nèi)容的套打
begin
if DetailBand1.Controls[I] is TQRShape then
begin
if Tao_Print_Flag then
TQRShape(DetailBand1.Controls[I]).Enabled := False
else
TQRShape(DetailBand1.Controls[I]).Enabled := True;
end;
end;
for i := 0 to PageFooterBand1.ControlCount - 1 do //設(shè)置頁尾的套打
begin
if PageFooterBand1.Controls[I] is TQRLabel then
begin
if Tao_Print_Flag then
begin
TQRLabel(PageFooterBand1.Controls[I]).Enabled := False;
if (PageFooterBand1.Controls[I].Name = 'QRLabel24') then
TQRLabel(PageFooterBand1.Controls[I]).Enabled := True;
end
else
TQRLabel(PageFooterBand1.Controls[I]).Enabled := True;
end;
if PageFooterBand1.Controls[I] is TQRShape then
begin
if Tao_Print_Flag then
TQRShape(PageFooterBand1.Controls[I]).enabled := False
else
TQRShape(PageFooterBand1.Controls[I]).Enabled := True;
end;
if PageFooterBand1.Controls[i] is TQRRichText then
begin
if IntToStr(Printer.PageNumber) = QRLabel21.Caption then
TQRRichText(PageFooterBand1.Controls[I]).Enabled := True
else
TQRRichText(PageFooterBand1.Controls[I]).Enabled := False;
end;
end;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -