Multiple records on each row

Hi,

I need to print a report with ID pictures and corresponding names for each student in the classes at a school.

There should be 4 pictures on each row and eight rows on each page.

Each record's JPG image is stored in BLOB fields. I use the code below to display it in a TImage on ordinary forms in my application.
Can I use the same code here, or how do I get the images on my report?

Thanks for comments on this.

regards Tor


procedure ShowJPG(FieldImg: TBlobField; Picture: TPicture);
var
Stream: TMemoryStream;
Jpg: TJpegImage;
begin
if FieldImg.IsNull then
begin
Picture.Assign(nil);
exit;
end;
try
Stream:=TMemoryStream.Create;
Jpg:=TJpegImage.Create;
try
FieldImg.SaveToStream(Stream);
if (Stream.Size>0) then
begin
Stream.Position:=0;
Jpg.LoadFromStream(Stream);
Picture.Assign(Jpg);
end
else Picture.Assign(nil);
finally
jpg.Free;
Stream.Free;
end;
except
Picture.Assign(nil);
end;
end; {ShowJPG}

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:00AM
    a picture view can be connected to blob field.
    for multiple images across divide either the band or the page into columns.
  • edited September 2013
    gordk wrote: »
    a picture view can be connected to blob field.
    for multiple images across divide either the band or the page into columns.

    Thanks, for the help. I finally found out of it :-)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.