?? jm_kcdetail_rpt.pas
字號:
{*******************************************************}
{ }
{ 庫存量一覽表(營業(yè)員庫存)打印 }
{ }
{ 中軟金馬公司版權(quán)所有。2002.12前 }
{ }
{ 編制:中軟金馬郵資票品項目開發(fā)組 }
{ }
{ }
{*******************************************************}
(*
本模塊在地市pub庫存量一覽表模塊里面調(diào)用。
*)
unit JM_KCDetail_RPT;
interface
uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Forms, Quickrpt, QRCtrls, Db, DBTables;
type
TQuickReport1 = class(TQuickRep)
ColumnHeaderBand1: TQRBand;
DetailBand1: TQRBand;
PageFooterBand1: TQRBand;
PageHeaderBand1: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel10: TQRLabel;
QRLabel11: TQRLabel;
Qry_yyykc: TQuery;
Qry_any: TQuery;
Qry_temp: TQuery;
QRRichText1: TQRRichText;
QRRichText2: TQRRichText;
QRRichText3: TQRRichText;
QRRichText4: TQRRichText;
QRRichText5: TQRRichText;
QRRichText6: TQRRichText;
QRRichText7: TQRRichText;
QRRichText8: TQRRichText;
QRRichText9: TQRRichText;
QRRichText10: TQRRichText;
QRShape1: TQRShape;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRShape13: TQRShape;
QRShape14: TQRShape;
QRShape15: TQRShape;
QRShape16: TQRShape;
QRShape17: TQRShape;
QRShape18: TQRShape;
QRShape19: TQRShape;
QRShape20: TQRShape;
QRShape21: TQRShape;
QRShape22: TQRShape;
QRShape23: TQRShape;
QRShape24: TQRShape;
QRShape25: TQRShape;
QRLabel12: TQRLabel;
QRRichText11: TQRRichText;
QRRichText12: TQRRichText;
QRShape26: TQRShape;
QRShape27: TQRShape;
QRLabel13: TQRLabel;
QRShape28: TQRShape;
QRShape29: TQRShape;
procedure QuickRepNeedData(Sender: TObject; var MoreData: Boolean);
procedure QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
private
public
ygmc:array of string;
sl:array of string;
end;
var
QuickReport1: TQuickReport1;
implementation
{$R *.DFM}
procedure TQuickReport1.QuickRepNeedData(Sender: TObject;
var MoreData: Boolean);
var
i:Integer;
begin
i:=0;
setlength(ygmc,Qry_temp.recordcount);
setLength(sl,Qry_temp.RecordCount);
Qry_temp.First;
while not Qry_temp.eof do
begin
with Qry_any do
begin
Close;
Sql.Clear;
Sql.Add('select sum(sl) sl from tm_yyykc where ygdm='''+Qry_temp.FieldByName('ygdm').AsString +''' and ppdm='''+ Qry_yyykc.FieldByName('ppdm').AsString+''' and jj/100 ='+VarToStr(Qry_yyykc.FieldByName('jj').AsFloat));
Open;
end;
ygmc[i]:=Qry_temp.FieldByName('ygmc').AsString;
sl[i]:=FormatFloat('#,##',Qry_any.FieldByName('sl').AsFloat);
Inc(i);
Qry_temp.Next;
end;
QRRichText1.Lines.Text:=Qry_yyykc.fieldbyname('zh').AsString;
QRRichText2.Lines.Text:=Qry_yyykc.fieldbyname('ppmc').AsString;
if QRRichText2.Lines.Count=1 then
begin
QRRichText2.Height :=QRRichText1.Height;
QRRichText2.Top :=QRRichText1.Top;
end;
if QRRichText2.Lines.Count >=2 then
begin
QRRichText2.Height :=27;
QRRichText2.Top :=3;
end;
QRRichText4.Lines.Text:=FormatFloat('#,##',Qry_yyykc.fieldbyname('sl').AsFloat);
QRRichText3.Lines.Text:=FormatFloat('#,##0.00',Qry_yyykc.fieldbyname('jj').AsFloat);
if i=1 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
end;
if i=2 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
QRlabel7.Caption:=ygmc[1];
QRRichText6.Lines.Text:=sl[1];
end;
if i=3 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
QRlabel7.Caption:=ygmc[1];
QRRichText6.Lines.Text:=sl[1];
QRlabel8.Caption:=ygmc[2];
QRRichText7.Lines.Text:=sl[2];
end;
if i=4 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
QRlabel7.Caption:=ygmc[1];
QRRichText6.Lines.Text:=sl[1];
QRlabel8.Caption:=ygmc[2];
QRRichText7.Lines.Text:=sl[2];
QRlabel9.Caption:=ygmc[3];
QRRichText8.Lines.Text:=sl[3];
end;
if i=5 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
QRlabel7.Caption:=ygmc[1];
QRRichText6.Lines.Text:=sl[1];
QRlabel8.Caption:=ygmc[2];
QRRichText7.Lines.Text:=sl[2];
QRlabel9.Caption:=ygmc[3];
QRRichText8.Lines.Text:=sl[3];
QRlabel10.Caption:=ygmc[4];
QRRichText9.Lines.Text:=sl[4];
end;
if i=6 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
QRlabel7.Caption:=ygmc[1];
QRRichText6.Lines.Text:=sl[1];
QRlabel8.Caption:=ygmc[2];
QRRichText7.Lines.Text:=sl[2];
QRlabel9.Caption:=ygmc[3];
QRRichText8.Lines.Text:=sl[3];
QRlabel10.Caption:=ygmc[4];
QRRichText9.Lines.Text:=sl[4];
QRlabel11.Caption:=ygmc[5];
QRRichText10.Lines.Text:=sl[5];
end;
if i=7 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
QRlabel7.Caption:=ygmc[1];
QRRichText6.Lines.Text:=sl[1];
QRlabel8.Caption:=ygmc[2];
QRRichText7.Lines.Text:=sl[2];
QRlabel9.Caption:=ygmc[3];
QRRichText8.Lines.Text:=sl[3];
QRlabel10.Caption:=ygmc[4];
QRRichText9.Lines.Text:=sl[4];
QRlabel11.Caption:=ygmc[5];
QRRichText10.Lines.Text:=sl[5];
QRlabel12.Caption:=ygmc[6];
QRRichText11.Lines.Text:=sl[6];
end;
if i>=8 then
begin
QRlabel6.Caption:=ygmc[0];
QRRichText5.Lines.Text:=sl[0];
QRlabel7.Caption:=ygmc[1];
QRRichText6.Lines.Text:=sl[1];
QRlabel8.Caption:=ygmc[2];
QRRichText7.Lines.Text:=sl[2];
QRlabel9.Caption:=ygmc[3];
QRRichText8.Lines.Text:=sl[3];
QRlabel10.Caption:=ygmc[4];
QRRichText9.Lines.Text:=sl[4];
QRlabel11.Caption:=ygmc[5];
QRRichText10.Lines.Text:=sl[5];
QRlabel12.Caption:=ygmc[6];
QRRichText11.Lines.Text:=sl[6];
QRlabel13.Caption:=ygmc[7];
QRRichText12.Lines.Text:=sl[7];
end;
MoreData:=not Qry_yyykc.Eof ;
if not Qry_yyykc.Eof then Qry_yyykc.Next;
end;
procedure TQuickReport1.QuickRepBeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
begin
Qry_yyykc.First;
end;
end.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -