好像还是不行!?提示说"找不到字段...."!这是什么问题?我是从FORM1中直接调用QUICKRPT1
的,FORM1和FORM2中各有DATASOURCE和TABLE控件,且属性设置教师一样的.代码如下:
procedure form1.button1click(sender: tobject);
begin
form2.quickrep1.preview;
end;
procedure
var
tmpg: tblobstream;
jpg: tjpegimage;
begin
TForm8.QuickRep1NeedData(Sender: TObject;
var MoreData: Boolean);
if TBlobField(form8.Table1.FieldbyName('photo')).isnull=false then
begin
tmpg:=TBlobStream.Create(TBlobField(Table1.FieldbyName('photo')), bmRead);
jpg:= TJPEGImage.Create;
jpg.LoadFromStream(tmpg);
qrImage1.Picture.Assign(jpg);
tmpg.free;
jpg.free;
end
else
qrimage1.picture:=nil;
end;