动态生成组件 在线等 各位如何动态生成打印的 QRShape QRLabel QRDBText 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 还是用fastreprot吧,它里面的对象都是可以动态控制的。 quickreport 不能动态控制吗 我在ACTIVE窗体里创建 用..:=TQRLabel.Create(Application) 好像没有Application 那位用过 var i, j: integer; QuickRep1: TQuickRep; QRLabel1: array of TQRLabel; QRLabel2: TQRLabel; Item: TListItem;begin if Tag = 1 then begin QuickRep1 := TQuickRep.Create(self); QuickRep1.Font.Charset := GB2312_CHARSET; QuickRep1.Font.Name := '宋体'; QuickRep1.Font.Size := 10; QuickRep1.Bands.HasTitle := True; QuickRep1.Bands.HasDetail := True; QRLabel2 := TQRLabel.Create(self); QRLabel2.Parent := QuickRep1.Bands.TitleBand; case Mode of 0:QRLabel2.Caption := '交班话费清单'; 1:QRLabel2.Caption := '小计话费清单'; 2:QRLabel2.Caption := '统计话费清单'; end; QRLabel2.Font.Size := 14; QRLabel2.Left := QuickRep1.Bands.TitleBand.Width div 3; SetLength(QRLabel1,ListView1.Columns.Count*ListView1.Items.Count); for i:=0 to ListView1.Items.Count-1 do begin Item := Listview1.Items[i]; if i = 0 then begin for j := 0 to Listview1.Columns.Count-1 do begin QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self); QRLabel1[i*Listview1.Columns.Count+j].Parent := QuickRep1.Bands.DetailBand; QRLabel1[i*Listview1.Columns.Count+j].Caption :=Trim(Listview1.Columns[j].Caption); QRLabel1[i*Listview1.Columns.Count+j].left :=Item.Left+j*Listview1.Column[j].Width; //j*50; QRLabel1[i*Listview1.Columns.Count+j].Top := Listview1.Top; end; end; for j := 0 to Listview1.Columns.Count-2 do begin if j = 0 then begin QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self); QRLabel1[i*Listview1.Columns.Count+j].Parent := QuickRep1.Bands.DetailBand; QRLabel1[i*Listview1.Columns.Count+j].Caption :=Trim(Item.Caption); QRLabel1[i*Listview1.Columns.Count+j].left :=Item.Left+j*Listview1.Column[j].Width; //j*50; QRLabel1[i*Listview1.Columns.Count+j].Top := Item.Top + i; end; QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self); QRLabel1[i*Listview1.Columns.Count+j].Parent := QuickRep1.Bands.DetailBand; QRLabel1[i*Listview1.Columns.Count+j].Caption :=Trim(Item.SubItems.Strings[j]); QRLabel1[i*Listview1.Columns.Count+j].left :=Item.Left+(j+1)*Listview1.Column[j].Width; //j*50; QRLabel1[i*Listview1.Columns.Count+j].Top := Item.Top + i; end; end; QuickRep1.PreviewModal; end;end; 在active中QuickRep1 := TQuickRep.Create(self);都过不去大家帮忙 为什么我QRLabel2 := TQRLabel.Create(self); 可以执行但 QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self); 执行不了高手! 定义声明QRLabel1[i*Listview1.Columns.Count+j]这个死鬼有没错误? 不能那么定义吧!如果要为每个新添的对象命名的话,还是分开的好:tmpQRLabel := TQRLabel.Create (self);tmpQRLabel.Name := 'QRLabel' + IntToStr(i*Listview1.Columns.Count+j); 新手问题 DELPHI,pos客显控制中是否每次都要关闭串口 写了个图像缩放函数 关于继承问题 不解,用sendmessage控制scrollbox滚动条翻页! 软件快作完了,准备做共享。大家来评评,先发个demo 怎么去掉access的登陆框 高手帮忙 有关打开.db问题 各位老大救我, 怎样才能让Delphi2006生成的程序在其它电脑上也能运行? 各位GG进来帮助哈要毕业的小弟.........谢谢 我是个新手,情各位大哥,大姐帮帮忙!
我在ACTIVE窗体里创建 用..:=TQRLabel.Create(Application) 好像没有Application
那位用过
i, j: integer;
QuickRep1: TQuickRep;
QRLabel1: array of TQRLabel;
QRLabel2: TQRLabel;
Item: TListItem;
begin
if Tag = 1 then
begin
QuickRep1 := TQuickRep.Create(self);
QuickRep1.Font.Charset := GB2312_CHARSET;
QuickRep1.Font.Name := '宋体';
QuickRep1.Font.Size := 10;
QuickRep1.Bands.HasTitle := True;
QuickRep1.Bands.HasDetail := True;
QRLabel2 := TQRLabel.Create(self);
QRLabel2.Parent := QuickRep1.Bands.TitleBand;
case Mode of
0:QRLabel2.Caption := '交班话费清单';
1:QRLabel2.Caption := '小计话费清单';
2:QRLabel2.Caption := '统计话费清单';
end;
QRLabel2.Font.Size := 14;
QRLabel2.Left := QuickRep1.Bands.TitleBand.Width div 3;
SetLength(QRLabel1,ListView1.Columns.Count*ListView1.Items.Count);
for i:=0 to ListView1.Items.Count-1 do
begin
Item := Listview1.Items[i];
if i = 0 then
begin
for j := 0 to Listview1.Columns.Count-1 do
begin
QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self);
QRLabel1[i*Listview1.Columns.Count+j].Parent := QuickRep1.Bands.DetailBand;
QRLabel1[i*Listview1.Columns.Count+j].Caption :=Trim(Listview1.Columns[j].Caption);
QRLabel1[i*Listview1.Columns.Count+j].left :=Item.Left+j*Listview1.Column[j].Width; //j*50;
QRLabel1[i*Listview1.Columns.Count+j].Top := Listview1.Top;
end;
end;
for j := 0 to Listview1.Columns.Count-2 do
begin
if j = 0 then
begin
QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self);
QRLabel1[i*Listview1.Columns.Count+j].Parent := QuickRep1.Bands.DetailBand;
QRLabel1[i*Listview1.Columns.Count+j].Caption :=Trim(Item.Caption);
QRLabel1[i*Listview1.Columns.Count+j].left :=Item.Left+j*Listview1.Column[j].Width; //j*50;
QRLabel1[i*Listview1.Columns.Count+j].Top := Item.Top + i;
end;
QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self);
QRLabel1[i*Listview1.Columns.Count+j].Parent := QuickRep1.Bands.DetailBand;
QRLabel1[i*Listview1.Columns.Count+j].Caption :=Trim(Item.SubItems.Strings[j]);
QRLabel1[i*Listview1.Columns.Count+j].left :=Item.Left+(j+1)*Listview1.Column[j].Width; //j*50;
QRLabel1[i*Listview1.Columns.Count+j].Top := Item.Top + i;
end;
end;
QuickRep1.PreviewModal;
end;
end;
大家帮忙
但 QRLabel1[i*Listview1.Columns.Count+j]:= TQRLabel.Create (self); 执行不了
高手!
tmpQRLabel.Name := 'QRLabel' + IntToStr(i*Listview1.Columns.Count+j);