Variable Image where not Printed - Why?
Hello,
i have three images and want to print one of this images in my report. In my record which i read from a database is the information which image i need. Know i want to realise it so
Where is my Problem? How can help me?
i have three images and want to print one of this images in my report. In my record which i read from a database is the information which image i need. Know i want to realise it so
procedure Picture1OnBeforePrint(Sender: TfrxComponent);
begin
  case <DBDatenKunde."Objekt"> of
    'cb' : Picture1.Picture.LoadFromFile('g:\Projekte\Erfassen\Images\Briefe\cb_logo_brief.jpg');
    'cbs' : Picture1.Picture.LoadFromFile('g:\Projekte\Erfassen\Images\Briefe\cbs_logo_brief.jpg');
    'avfb' : Picture1.Picture.LoadFromFile('g:\Projekte\Erfassen\Images\Briefe\avfb_logo_brief.jpg');       Â
    else Picture1.Picture.LoadFromFile('g:\Projekte\Erfassen\Images\Briefe\cb_logo_brief.jpg');                           Â
  end;
end;
The Report was printet, but i have no image. When i do it so
procedure Picture1OnBeforePrint(Sender: TfrxComponent);
begin
  case <DBDatenKunde."Objekt"> of
    'cb' : Picture1.Picture.LoadFromFile('cb_logo_brief.jpg');
    'cbs' : Picture1.Picture.LoadFromFile('cbs_logo_brief.jpg');
    'avfb' : Picture1.Picture.LoadFromFile('avfb_logo_brief.jpg');       Â
    else Picture1.Picture.LoadFromFile('cb_logo_brief.jpg');                           Â
  end;
end;
i get the error, that the imagefile cannot be open. But the image where in the right directory.Where is my Problem? How can help me?
Comments
IIRC case statements evaluate with numerics not strings.