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

Printing ImageEn Images in End User Designer

edited July 2004 in End User
I am using D7.1 with BDE, RB 7.04, and ImageEn 2.1.5.

Has anyone tried printing non BMP images in ReportBuilder? It doesn't seem
to work.

Comments

  • edited August 2004
    Hi Issac,

    Which type of images are you trying to print? ReportBuilder natively
    supportes bmp, jpeg, and gif image formats and with the use of GraphicEx
    Delphi addon, numerous other formats are available.

    ---------------------------------------------------------------------
    Article: ReportBuilder Image Support
    ---------------------------------------------------------------------

    ReportBuilder natively supports .bmp, .jpeg, .wmf, .ico image formats.

    ReportBuilder has an open architecture that supports any TGraphic
    descendant.

    For example, ReportBuilder ships with a freeware component called GIFImage
    that can be used with ReportBuilder to print .gif images. (see the main
    report demo app for an example.)

    There is another freeware component called GraphicEx that
    supports several additional formats - including tiff, targa, and autodesk.

    It can be downloaded from:

    http://www.lischke-online.de/Graphics.php


    ReportBuilder can easily support TGraphic descendants
    with a simple register call.

    Below is the code to our ppGIF.pas unit which
    'uses' and registers the freeware GIFImage component.


    {********************************************************************}
    { }
    { ReportBuilder Report Component Library }
    { }
    { Copyright (c) 1996, 2000 Digital Metaphors Corporation }
    { }
    {********************************************************************}

    unit ppGIF;

    interface

    {$I ppIfDef.pas}

    uses
    ppCtrls, GIFImage;

    implementation

    {***************************************************************
    *
    ** I N I T I A L I Z A T I O N / F I N A L I Z A T I O N
    *
    {****************************************************************}

    initialization

    ppRegisterGraphicClass('GIF', TGIFImage);

    finalization

    ppUnRegisterGraphicClass(TGIFImage);

    end.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2004
    Thanks for the info, but I can't seem to get jpegs to display. The Image
    GraphicType only allows for BMP, Icon, and Metafile. Is there something that
    I am missing?

  • edited August 2004

    Try adding ppJPEG to the uses clause.

    --


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2004
    Thanks. That worked great.

    Is there a way to have the DBImage component autosize?

  • edited August 2004

    The TppImage has an autosize feature, but the DBImage does not - perhaps
    something we can add to a future release.

    The TppImage resizes the bounds of the control to match the size of the
    picture. Try adding some similar code to the Band.BeforePrint event:

    uses
    ppPrnable, ppCtrls;

    if (myDBImage.Picture.Width > 0) and (myDBImage.Picture.Height > 0) then
    myDBImage.spSetBounds(myDBImage.spLeft, myDBImage.spTop,
    myDBImage.Picture.Width, myDBImage.Picture.Height);



    --


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2004
    Thanks. I would really like to see DBImage.Autosize available in a future
    release.

This discussion has been closed.