Image Control

I have an Image Control on a report with a bitmap assigned. Can anyone show me the syntax to set this controls’ visible property using C/AL? Simon Edited by - SimonMc on 11/13/00 9:41:42 PM

Only when you give your control a Name, you can access its properties in runtime. Say you name your image Image1, then turning on/off becomes as simple as Image1.Visible = True John

I tried that but got an error because the name, Image1, is not defined. I declared Image1 to be a text variable and got another error saying I couldn’t use that syntax. Simon

John, The trick with giving a name to a control doesn’t work with Reports. CurrReport.Image1.Visible=True will not be recognized by Navision. Simon, As far as I know it is not possible to set the visible-property of an imagecontrol in a report. However, there is an other way, but it takes some more work. You can use a BLOB in the source-expression of your Imagecontrol. With C/AL you can decide which image to load. That means you can also load an ‘empty’ image. Anolis Sittard Netherlands

Oops, overlooked the word “report” :slight_smile: With reports you use a BLOB field as source for the imagebox, as Anolis said already, and depending on some variable you do, or do not, CALCFIELD(table.blobfield). Without doing Calcfield, the blob will not be processed and appears as an empty image. John