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

TppDBImage not drawing at run time

edited August 2003 in General
Hello,

I'm happily using RB Pro 6.02 on Delphi 5 SP1.

I have a JPEG stored in a blob on a Firebird Database, using TppDBImage
it displays fine at design time, and in the design preview of TppReport,
yet not during run time.

First I had trouble with not retaining JPEG as the GraphicsType, so I
added this to OnGetPicture event:

with ppDBImage do
begin
GraphicType := 'JPEG';
AutoDisplay := True;
AutoSize := True;
Center := True;
end;

What more do I need to get it to display in the Runtime Preview and
output document?

Cheers.

Skot.

Comments

  • edited August 2003
    Add ppJPEG to your uses clause.

    Regards

  • edited August 2003
    Moctezuma Sandoval wrote:


    That didn't do it either. See anything else I missed?
  • edited August 2003
    Skot,

    I was having exactly the same trouble, and the ppJPEG in uses clause did the
    trick, here is a sample of the unit's code:

    unit uDMReports;

    interface

    uses
    SysUtils, Classes, ppParameter, ppModule, raCodMod, ppBands, ppClass,
    ppVar, ppCtrls, ppPrnabl, ppCache, ppProd, ppReport, ppDB, ppComm,
    ppRelatv, ppDBPipe, DB, IBODataset, IB_Components, ppJPEG, ppStrtch,
    ppSubRpt;

    type
    TdmReports = class(TDataModule)
    ...
    ... blah, blah, blah

    I'm also using a FireBird database, so the graphic field is defined as :
    BLOB SUBTYPE 3, the only relevant thing that I did on the TppDBImage
    was to change the GraphicType property to : JPEG, thats all, everything is
    working fine now.

    I hope this could be helpful for you

    Best Regards
    Mocte


  • edited August 2003
    Moctezuma Sandoval wrote:

    I tried adding it to the form with the report on it, to the DataModule
    where the TppDBPipeLine is, and both but still no luck.


    Like I said, it works fine in design mode, but not in preview during run
    time. I changed the GraphicType both design time and runtime and still
    nothing. Maybe I'm doing it wrong during runtime, I don't know.


This discussion has been closed.