Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How I can Display a non Static Image?

Status
Not open for further replies.

jjmew

Programmer
Aug 20, 2002
34
0
0
US
I am working in a report and i need to have a image that will change depends of the value of every record, How i can do that?
 
If you are using an AcImageControl then there is a property called FileNameExp. In here you can put a database field name or variable name. In your case you will use a variable and in the OnRead of the DataRow update that variable with the path to the image you want to insert.

You may also want to check that the image file exists before you set the variable. Like this

Select Case (data row value)
Case 1
If FileExists(path and file name1) Then
file location variable = path/filename1
Else
error code
End If
Case 2
If FileExists(path and file name2) Then
file location variable = path/filename2
Else
error code
End If
End Select

Then in your image control set FileNameExp = file location variable
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top