Hi Good Day!

I have problem in delphi i cannot load image (jpeg) into QRDBImage on Quick Report, I used memdata and data source,

code:
procedure TfrmEntityModule.actCOPExecute(Sender: TObject);
var
frm: Trep_EDR;
OrganizedGroup: TRoOrganizedGroup;
begin
frm := nil;
OrganizedGroup := nil;
frm := Trep_EDR.Create(Self);
OrganizedGroup := sMainApp.MCISService.GetOrganizedGroup(txtEntityNo.Text);
try
frm.mds2.Close;
frm.mds2.Open;
frm.mds2.Edit; frm.mds2PICTURE.LoadFromStream(OrganizedGroup.OrganizedGroupDetailInfo.Image_OG_Specimen_Signature);
frm.mds2.Post;
end;

frm.qr_COP.Preview;
finally
frm.Release;
FreeAndNil(frm);
FreeAndNil(OrganizedGroup);
end;
end;


I obtain this error:

EInvalidGraphic with message 'Bitmap Image is not valid'

Please help! Thanks...

Hi Good Day!

I have problem in delphi i cannot load image (jpeg) into QRDBImage on Quick Report, I used memdata and data source,

code:
procedure TfrmEntityModule.actCOPExecute(Sender: TObject);
var
frm: Trep_EDR;
OrganizedGroup: TRoOrganizedGroup;
begin
frm := nil;
OrganizedGroup := nil;
frm := Trep_EDR.Create(Self);
OrganizedGroup := sMainApp.MCISService.GetOrganizedGroup(txtEntityNo.Text);
try
frm.mds2.Close;
frm.mds2.Open;
frm.mds2.Edit; frm.mds2PICTURE.LoadFromStream(OrganizedGroup.OrganizedGroupDetailInfo.Image_OG_Specimen_Signature);
frm.mds2.Post;
end;

frm.qr_COP.Preview;
finally
frm.Release;
FreeAndNil(frm);
FreeAndNil(OrganizedGroup);
end;
end;


I obtain this error:

EInvalidGraphic with message 'Bitmap Image is not valid'

Please help! Thanks...

I had this same problem and was able to correct it.. what you have to do is actually locate the type in the .dfm file and make sure that you dynamically load the image or just do it at design time.

I would have to see the original file to correct this for you.. I did this a few weeks ago and was able to fix the issue in one of my projects.
mrcaston@yahoo.com if you need me to look at the code files for you.

Hi please provide beautfull code for to load image in QuickReport from table

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.