First Image Problem on Report (1 Viewer)

Abbos

Registered User.
Local time
Today, 17:23
Joined
May 11, 2005
Messages
64
Hi,

I have a database whereby from the main DB, users can filter records and view reports of the results.

I have everything working except the the first image for the first record displayed on the report. The code I currently have attached to the On Page event for the report is:

Code:
If Not IsNull(Me.Image) Then
    Me.ImageFrame.Visible = True
    myimage = False
    Me.ImageFrame.Picture = Me.Image
Else
    Me.ImageFrame.Picture = Location
End If

I have tried adding the code to the On Activate event of the report but this then does not refresh the image as I navigate through the pages.

Can anyone help?
 

Simon_MT

Registered User.
Local time
Today, 17:23
Joined
Feb 26, 2007
Messages
2,176
This code should be on the Detail Section On Format so that the report can evaulate Location assuming that different images apply each record on the report.

Simon
 

Abbos

Registered User.
Local time
Today, 17:23
Joined
May 11, 2005
Messages
64
Different images do apply to each record on the report but I cannot seem to find the Detail Section On Format. Can you point me in the right direction please?
 

Abbos

Registered User.
Local time
Today, 17:23
Joined
May 11, 2005
Messages
64
Found it by accident! Will give that a try now.
 

Abbos

Registered User.
Local time
Today, 17:23
Joined
May 11, 2005
Messages
64
Simon,

Thanks for the pointer. It seems to have solved the problem but the issue it causes is that everytime the report is generated it attempts to "import" all of the images first. Although they are linked, it still takes a while and on some of the bigger reports it takes ages.

Is there a way around this?
 

Simon_MT

Registered User.
Local time
Today, 17:23
Joined
Feb 26, 2007
Messages
2,176
I would check your images sizes, I do understand that Access might have a problem with rendering large images. If you using images with Access it is important to use thumbnails even if this means having two versions. Our images are no bigger than 100K.

Simon
 

Dragonchaser

Registered User.
Local time
Today, 10:23
Joined
May 15, 2007
Messages
31
same issue here

Sorry to hijack threads. ;)

I'm having the exact same issue as Abbos, but moving the code to Detail On_Format from Report On_Activate didn't solve my problem. :(
Now when I goto preview the report it won't go at all. I'm stuck in the design screen. :confused: What did I do different?
Can anyone want to help me with this one?

All the best,

Dragonchaser
 

Simon_MT

Registered User.
Local time
Today, 17:23
Joined
Feb 26, 2007
Messages
2,176
Try creating a SubForm with the Image Control and a Query with the variable Field to that dictates the Image File to use and the Image file (Full Name).

All we are doing here is splitting the Image away from the main report and then adding the image as a subform.

Do over-estimate Access ability to handle images, large images certainly annoy Access.

I use an ActiveX control and it works.

Simon
 

Dragonchaser

Registered User.
Local time
Today, 10:23
Joined
May 15, 2007
Messages
31
Thanks, Simon.
I'll give that a shot.
I'll assume if access doesn't like images, it definitely wouldn't like say 17 images in the same report. :eek: (It's basically a blueprint that fills in certain parts of the drawing according to what the user enters in the fields)
I'll be making 17 subforms and queries then. :D
Unless there's a shortcut.
 

Dragonchaser

Registered User.
Local time
Today, 10:23
Joined
May 15, 2007
Messages
31
Sorry Simon, I guess I'm a lot worse at this than I thought. :(
How do I create a query that chooses images?
Should I create a table of objects and have the query pick which object to show based on what the field in the report shows?
Am I sorta on the right track?
 

Users who are viewing this thread

Top Bottom