📄 sj_txpfhddy.pas
字号:
{*******************************************************}
{ }
{ 零枚票发货单打印 }
{ }
{ 中软金马公司版权所有。2002.12前 }
{ }
{ 编制:中软金马项目开发组 }
{ }
{ }
{*******************************************************}
(*
本模块在省级库房管理模块 零枚票部分的 零枚票发货审核 模块中调用。
*)
unit SJ_TXPFHDDY;
interface
uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Forms, Quickrpt, QRCtrls,Dialogs, Db, DBTables;
type
TFrmK_TXFHDDY = class(TQuickRep)
PageHeaderBand1: TQRBand;
PageFooterBand1: TQRBand;
ColumnHeaderBand1: TQRBand;
SummaryBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel6: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel19: TQRLabel;
QRLabel20: TQRLabel;
QRLabel21: TQRLabel;
QRLabel22: TQRLabel;
QRLabel24: TQRLabel;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRLabel25: TQRLabel;
QRLabel4: TQRLabel;
QRLabel13: TQRLabel;
DetailBand1: TQRBand;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRShape13: TQRShape;
QRRichText2: TQRRichText;
QRRichText3: TQRRichText;
QRRichText4: TQRRichText;
QRRichText5: TQRRichText;
QRRichText6: TQRRichText;
QRRichText7: TQRRichText;
Qry_ckdayin: TQuery;
ChildBand1: TQRChildBand;
Qry_bz: TQuery;
QRLabel11: TQRLabel;
QRLabel10: TQRLabel;
QRShape2: TQRShape;
QRShape5: TQRShape;
QRShape14: TQRShape;
QRShape15: TQRShape;
QRShape16: TQRShape;
QRShape17: TQRShape;
QRLabel23: TQRLabel;
QRLabel3: TQRLabel;
QRLabel5: TQRLabel;
QRLabel7: TQRLabel;
QRRichText8: TQRRichText;
QRRichText9: TQRRichText;
QRRichText10: TQRRichText;
QRShape18: TQRShape;
QRShape19: TQRShape;
QRShape20: TQRShape;
QRShape21: TQRShape;
QRShape22: TQRShape;
QRShape23: TQRShape;
QRShape24: TQRShape;
QRShape25: TQRShape;
QRShape26: TQRShape;
QRLabel14: TQRLabel;
QRLabel15: TQRLabel;
QRLabel26: TQRLabel;
QRLabel27: TQRLabel;
QRRichText1: TQRRichText;
QRRichText11: TQRRichText;
QRLabel2: TQRLabel;
QRShape27: TQRShape;
QRShape28: TQRShape;
QRLabel12: TQRLabel;
QRSysData1: TQRSysData;
QRShape30: TQRShape;
QRShape31: TQRShape;
QRShape32: TQRShape;
Qry_ckdayinZH: TStringField;
Qry_ckdayinTMC: TStringField;
Qry_ckdayinDW: TStringField;
Qry_ckdayinXJ: TFloatField;
Qry_ckdayinSL: TFloatField;
Qry_ckdayinZJJE: TFloatField;
Qry_ckdayinZK: TFloatField;
Qry_ckdayinJSJE: TFloatField;
Qry_ckdayinFXRQ: TDateTimeField;
QRShape1: TQRShape;
QRShape29: TQRShape;
procedure QuickRepNeedData(Sender: TObject; var MoreData: Boolean);
procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
function GetTextHeight(FontName:string;FontSize:Integer):integer;
procedure Qry_ckdayinXJGetText(Sender: TField; var Text: String;
DisplayText: Boolean);
procedure Qry_ckdayinXJSetText(Sender: TField; const Text: String);
private
public
nheight:integer;
sumzj:double;
sumjsj:double;
end;
var
FrmK_TXFHDDY: TFrmK_TXFHDDY;
implementation
uses Pub;
{$R *.DFM}
procedure TFrmK_TXFHDDY.QuickRepNeedData(Sender: TObject;
var MoreData: Boolean);
var
vlp_i_max,i,j:integer;zjje,jsje:double;
begin
QRRichText2.Lines.Text := Qry_ckdayin.fieldbyname('zh').asstring;
QRRichText3.Lines.Text := Qry_ckdayin.fieldbyname('tmc').asstring;
QRRichText4.Lines.Text := Qry_ckdayin.fieldbyname('dw').asstring;
QRRichText5.Lines.Text := FormatFloat('#,##',Qry_ckdayin.fieldbyname('sl').asFloat);
QRRichText6.Lines.Text := FormatFloat('#,##0.00',Qry_ckdayin.fieldbyname('xj').asFloat);
QRRichText7.Lines.Text := Qry_ckdayin.fieldbyname('zjje').asstring;
QRRichText7.Lines.Text :=FormatFloat('#,##0.00', Qry_ckdayin.fieldbyname('zjje').AsFloat );
zjje:=Qry_ckdayin.fieldbyname('zjje').asfloat;
QRRichText8.Lines.Text := Qry_ckdayin.fieldbyname('zk').asstring;
QRRichText9.Lines.Text :=FormatFloat('#,##0.00',Qry_ckdayin.fieldbyname('jsje').asFloat);
QRRichText10.Lines.Text := Qry_ckdayin.fieldbyname('fxrq').asstring;
jsje:=Qry_ckdayin.fieldbyname('jsje').asfloat;
if not(Qry_ckdayin.eof) then begin sumzj:=sumzj+zjje;
QRRichText1.Lines.Text := FormatFloat('#,##0.00',sumzj);
end;
if not(Qry_ckdayin.eof) then begin sumjsj:=sumjsj+jsje;
QRRichText11.Lines.Text := FormatFloat('#,##0.00',sumjsj);
end;
for I:=0 to DetailBand1.ControlCount-1 do
begin
if Not (DetailBand1.Controls[I] is TQRRichText) then
Continue;
if TQRRichText(DetailBand1.Controls[I]).Lines.Count<=1 then
Continue;
for J:=TQRRichText(DetailBand1.Controls[I]).Lines.Count-1 downto 0 do
begin
if comparetext(Trim(TQRRichText(DetailBand1.Controls[I]).Lines[J]),'')<>0 then
break;
TQRRichText(DetailBand1.Controls[I]).Lines.Delete(J);
end;
end;
vlp_i_max:=1;
for I:=0 to DetailBand1.ControlCount-1 do
begin
if Not (DetailBand1.Controls[I] is TQRRichText) then
Continue;
if TQRRichText(DetailBand1.Controls[I]).Lines.Count>vlp_i_max then
vlp_i_max:=TQRRichText(DetailBand1.Controls[I]).Lines.Count;
end;
DetailBand1.Height := vlp_i_max * nheight +4 ;
for I:=0 to DetailBand1.ControlCount-1 do
begin
if DetailBand1.Controls[I] is TQRShape then
TQRShape(DetailBand1.Controls[I]).Height:=DetailBand1.Height;
if DetailBand1.Controls[I] is TQRRichText then
TQRRichText(DetailBand1.Controls[I]).Height:=DetailBand1.Height;
end;
MoreData := not Qry_ckdayin.Eof;
if MoreData then
Qry_ckdayin.Next;
end;
function TFrmK_TXFHDDY.GetTextHeight(FontName:string;FontSize:Integer):integer;
begin
Font.Name:=FontName;
Font.Size:=FontSize;
Result:=Canvas.TextHeight('中软金马公司')+4;
end;
procedure TFrmK_TXFHDDY.QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
sumzj:=0;
sumjsj:=0;
Qry_ckdayin.First;
end;
procedure TFrmK_TXFHDDY.Qry_ckdayinXJGetText(Sender: TField;
var Text: String; DisplayText: Boolean);
begin
CurrGetText(sender,Text,Displaytext);
end;
procedure TFrmK_TXFHDDY.Qry_ckdayinXJSetText(Sender: TField;
const Text: String);
begin
CurrSetText(sender,Text);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -