Images in a report

A

Anja

Hi everyone,

The record source property of my report is a table where one of the
columns contains paths to images. In my report, I have a Image control
(in the detail section) where I would like to display the images.

However, there is no ControlSource property for the image
control.Also, sometimes the columns value could be NULL, in case, I do
not want to show anything (so there is a condition that has to be
checked here).

Searching the net, I came across the Detail_Format event but I am
unable to specify the column name in this method.

So, I have a table called Assets_T (which is the control source for
the report) and it has a column called "Photo".

The Detail_Format method is overloaded as follows:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

End Sub

Now, how can I refer to the column value for the current record in
this method???

Thanks for any help you might give me. I have banged my head against
this for an hour now and tun to you guys for some help!

Best,
Anja
 
G

Guest

Hi Anja,

Have code in the detail on format event similar to this:

if not isnull([Photo]) then
me.IMAGECONTROL.picture = [Photo]
end if

To use this, place your image control on your report and point it to a blank
image, so if there's nothing there it comes out blank... ie: a 1x1 pixel
white jpg or similar.

Hope this helps.

Damian.
 
A

Anja

Hi Damian,

Thanks for the reply! How do I make the image control a bound object?
I got most of it working but the report is acting as if there is only
one image control on the report, when there should be one for every
record in the control source...

Hi Anja,

Have code in the detail on format event similar to this:

if not isnull([Photo]) then
me.IMAGECONTROL.picture = [Photo]
end if

To use this, place your image control on your report and point it to a blank
image, so if there's nothing there it comes out blank... ie: a 1x1 pixel
white jpg or similar.

Hope this helps.

Damian.

Anja said:
Hi everyone,
The record source property of my report is a table where one of the
columns contains paths to images. In my report, I have a Image control
(in the detail section) where I would like to display the images.
However, there is no ControlSource property for the image
control.Also, sometimes the columns value could be NULL, in case, I do
not want to show anything (so there is a condition that has to be
checked here).
Searching the net, I came across the Detail_Format event but I am
unable to specify the column name in this method.
So, I have a table called Assets_T (which is the control source for
the report) and it has a column called "Photo".
The Detail_Format method is overloaded as follows:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Now, how can I refer to the column value for the current record in
this method???
Thanks for any help you might give me. I have banged my head against
this for an hour now and tun to you guys for some help!
Best,
Anja
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top