F
FLYINGFDK11
Unregistered / Unconfirmed
GUEST, unregistred user!
本人想动态的产生报表的内容,即qrdbedit控件的数量和内容动态指定到某表中.
但不知怎幺搞的产是产生了,但就是不显示出内容,代码如下,请大侠们请教
Procedure TFrmRAcqRec001.PrintAcq(Style:Integer);
//注:style用来区分是预鉴还是打印
Var
I : Integer;
//循环用
FPField : Array[0..20] Of TQRDBText;
//定义QRDBEDIT的数组
Leftwidth: Integer;
//用于定义每个QRDBEDIT的左边距
TmpFieldCode : Tstrings;
begin
TmpFieldCode := Tstringlist.Create;
TmpFieldCode := Destination.Items;
wwQuery1.close;
wwQuery1.sql.Text := GetSql(wwPrintN.text,TmpFieldCode);
//取得sql描述
leftwidth :=round(QuickRep1.Page.LeftMargin);
For I := 0 to TmpFieldCode.Count-1do
begin
FPField := TQrDBText.Create(APPLICATION);
FPField.Parent := Qrband3;
FPField.DataSet :=wwquery1;
FPField.DataField := TmpFieldCode;
FPField.Parent := CDetail;
FPField.Left:= Leftwidth+80;
FPField.WordWrap := False;
FPField.Enabled := False;
FPField.Top := 1;
leftwidth := Leftwidth+80;
end;
wwQuery1.open;
QuickRep1.DataSet := wwQuery1;
QuickRep1.Preview;
end;
但不知怎幺搞的产是产生了,但就是不显示出内容,代码如下,请大侠们请教
Procedure TFrmRAcqRec001.PrintAcq(Style:Integer);
//注:style用来区分是预鉴还是打印
Var
I : Integer;
//循环用
FPField : Array[0..20] Of TQRDBText;
//定义QRDBEDIT的数组
Leftwidth: Integer;
//用于定义每个QRDBEDIT的左边距
TmpFieldCode : Tstrings;
begin
TmpFieldCode := Tstringlist.Create;
TmpFieldCode := Destination.Items;
wwQuery1.close;
wwQuery1.sql.Text := GetSql(wwPrintN.text,TmpFieldCode);
//取得sql描述
leftwidth :=round(QuickRep1.Page.LeftMargin);
For I := 0 to TmpFieldCode.Count-1do
begin
FPField := TQrDBText.Create(APPLICATION);
FPField.Parent := Qrband3;
FPField.DataSet :=wwquery1;
FPField.DataField := TmpFieldCode;
FPField.Parent := CDetail;
FPField.Left:= Leftwidth+80;
FPField.WordWrap := False;
FPField.Enabled := False;
FPField.Top := 1;
leftwidth := Leftwidth+80;
end;
wwQuery1.open;
QuickRep1.DataSet := wwQuery1;
QuickRep1.Preview;
end;