Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

printing images

edited July 2003 in General
Hello,

I have a dataset with a Graphic field.
I put a DBImage component on Detail band to print it.
It works fine, but when there isn't an image on the field the same space is
left on the report.
I want the detail band stretch when there isn?t any image.

How can I do this?
Is there any manner to "autosize" de DBImage to the image in dataset?

Thanks in advance,

LADRILLO

Comments

  • edited July 2003
    Hi Ladrillo,

    You need to set the DetailBand.PrintHeight to phDynamic so the detail band
    will stretch to the size of the given components. Then in the
    DetailBand.BeforePrint event you can add some code to see if an image exists
    or not and set its 'visible' property to false if it does not.

    DetailBand.BeforePrint(aSender: TObject);
    begin
    if Report.DataPipeline['myImage'] = nil then
    myDBImage.Visible := False;

    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.