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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.