Hubert Rétif
2007-07-03 14:56:05 UTC
Hi,
Using D7 with rave 5.0.8
I am evaluating which is the best method for my needs (one page with some
JPEG fotos and a few data elements).
I can generate something simple, produced with the designer.
Now I am trying with code based:
procedure TfmMain.RvSystem1Print(Sender: TObject);
var
jpeg : TJPEGImage;
strm : TMemoryStream;
begin
with (Sender as TBaseReport) do
begin
SetFont('Arial', 15);
FontColor := clRed;
PrintXY(0.5,0.5, 'Just look at the images!');
strm := TMemoryStream.Create;
jpeg := TJPEGImage.Create;
try
jpeg.LoadFromFile('images\233\IMG_2986.JPG');
jpeg.SaveToStream(strm);
strm.Position := 0;
PrintImageRect(3,1,1,1, strm,'JPG');
PrintImageRect(1,2,3,3, strm,'JPG');
finally
jpeg.Free;
strm.Free;
end;
end;
end;
When executing it, I get the error message "unexpected code [47] found in
report file"
What did I wrong?
Thanks,
Hubert Retif
Using D7 with rave 5.0.8
I am evaluating which is the best method for my needs (one page with some
JPEG fotos and a few data elements).
I can generate something simple, produced with the designer.
Now I am trying with code based:
procedure TfmMain.RvSystem1Print(Sender: TObject);
var
jpeg : TJPEGImage;
strm : TMemoryStream;
begin
with (Sender as TBaseReport) do
begin
SetFont('Arial', 15);
FontColor := clRed;
PrintXY(0.5,0.5, 'Just look at the images!');
strm := TMemoryStream.Create;
jpeg := TJPEGImage.Create;
try
jpeg.LoadFromFile('images\233\IMG_2986.JPG');
jpeg.SaveToStream(strm);
strm.Position := 0;
PrintImageRect(3,1,1,1, strm,'JPG');
PrintImageRect(1,2,3,3, strm,'JPG');
finally
jpeg.Free;
strm.Free;
end;
end;
end;
When executing it, I get the error message "unexpected code [47] found in
report file"
What did I wrong?
Thanks,
Hubert Retif