Send Tsgimage picture To QrImage
Posted: 05 Jul 2006, 10:25
I can load a dxf file to a tsgimage and show on my
delphi form.
Now I need to send this Tsgimage.picture to
a Qrimage in Quickreport and preview the
report,how can I do?
I use follow code with no luck.Please help!
delphi form.
Now I need to send this Tsgimage.picture to
a Qrimage in Quickreport and preview the
report,how can I do?
I use follow code with no luck.Please help!
Code: Select all
<b>var</b>
vImg: TsgDXFImage;
StmImg: TMemoryStream;
<b>begin</b>
StmImg := TMemoryStream.Create;
<b>try</b>
vImg := TsgDXFImage(sgPaintBox.Picture.Graphic);
vImg.SaveToStream(StmImg);
QRImage1.Picture.Graphic.LoadFromStream(StmImg);
<font color="red">//this line got a AV</font id="red">
QuickRep1.preview;
<b>finally</b>
StmImg.Free;
<b>end</b>;