Picture
Hello there,
I'm getting mad trying to figure ot how to chage the picture of a Tpicture depending on a field value. I tied this way
I set ut my report with 4 timage fields where 3 of them are visible = False.
The fourth is the one to be printed. on the onbeforeprint event I wrote :
begin
IF [PlanConsult."Etat"]= 0 Then
Img.Picture.Assign(PicRouge.Picture)
ELSE IF [PlanConsult."Etat"]= 1 Then
Img.Picture.Assign(PicVert.Picture)
ELSE IF [PlanConsult."Etat"]> 2 Then
Img.Picture.Assign(PicFini.Picture)
end;
No chance..
Of course the report had to be finished yesterday
I'm getting mad trying to figure ot how to chage the picture of a Tpicture depending on a field value. I tied this way
I set ut my report with 4 timage fields where 3 of them are visible = False.
The fourth is the one to be printed. on the onbeforeprint event I wrote :
begin
IF [PlanConsult."Etat"]= 0 Then
Img.Picture.Assign(PicRouge.Picture)
ELSE IF [PlanConsult."Etat"]= 1 Then
Img.Picture.Assign(PicVert.Picture)
ELSE IF [PlanConsult."Etat"]> 2 Then
Img.Picture.Assign(PicFini.Picture)
end;
No chance..
Of course the report had to be finished yesterday