Images in Reports

  • Thread starter Thread starter SImone
  • Start date Start date
S

SImone

HI all,

Does anyone know how to include in a report an image
object with the image displayed different depending on a
particular condition?

Example: I have a field in my database called 'Country'
and I'd like in my report to display a different flag
(which is a GIF or BMP image) depending on the value of
the field COuntry in the database.

Thanks for the help.
Simone
 
Place an image control on the report.

Place a text control bound to your field (eg 'Country') - this ensures that the field data gets retrieved
(you can hide the control).

Handle the 'OnFormat' event of the 'Detail' section of the report, and load the relevant image into the
control depending on the value of the field, eg:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'Code to load image control here
End Sub
 
Back
Top