X
xinjia
Unregistered / Unconfirmed
GUEST, unregistred user!
两个窗体,form1,2 form1的Query2作为form2中QuickRep1的数据源
form2的QuickRep1中有titleband1,columnheaderband1,detailband1
titleband1中放qrlabel1,columnheaderband1放qrlabel2..5,caption定义为字段名
detailband1中放qrdbtext1..4未定义
form1中button1的onclick: 结果只显示标题和字段名页数等,字段内容一行不显示
tableshow.QuickRep1.DataSet :=query2;
case combobox6.ItemIndex of
tableshow.qrlabel1.caption:='基本情况表';
tableshow.QRDBText1.DataSet:=query2;
tableshow.QRDBText1.DataField:=query2.Fields[0].asstring;
nPageCount :=tableshow.QuickRep1.QRPrinter.PageCount;
tableshow.QRlabel2.caption := Format('第%2d页 共%2d页', [tableshow.QuickRep1.QRPrinter.PageNumber, nPageCount]);
tableshow.QRDBText2.DataSet:=query2;
tableshow.QRDBText2.DataField:=query2.Fields[1].asstring;
tableshow.QRDBText3.DataSet:=query2;
tableshow.QRDBText3.DataField:=query2.Fields[2].asstring;
tableshow.QRDBText4.DataSet:=query2;
tableshow.QuickRep1.Prepare ;
tableshow.QuickRep1.Preview ;
form2的QuickRep1中有titleband1,columnheaderband1,detailband1
titleband1中放qrlabel1,columnheaderband1放qrlabel2..5,caption定义为字段名
detailband1中放qrdbtext1..4未定义
form1中button1的onclick: 结果只显示标题和字段名页数等,字段内容一行不显示
tableshow.QuickRep1.DataSet :=query2;
case combobox6.ItemIndex of
tableshow.qrlabel1.caption:='基本情况表';
tableshow.QRDBText1.DataSet:=query2;
tableshow.QRDBText1.DataField:=query2.Fields[0].asstring;
nPageCount :=tableshow.QuickRep1.QRPrinter.PageCount;
tableshow.QRlabel2.caption := Format('第%2d页 共%2d页', [tableshow.QuickRep1.QRPrinter.PageNumber, nPageCount]);
tableshow.QRDBText2.DataSet:=query2;
tableshow.QRDBText2.DataField:=query2.Fields[1].asstring;
tableshow.QRDBText3.DataSet:=query2;
tableshow.QRDBText3.DataField:=query2.Fields[2].asstring;
tableshow.QRDBText4.DataSet:=query2;
tableshow.QuickRep1.Prepare ;
tableshow.QuickRep1.Preview ;