Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm finding it difficult to get MS reporting working to what I'd like to show.

What I'm trying to do is:

a) In my database store a URL file (HTTP external file), that is a .jpeg. I'd like to use that URL to call the image on the report sheet. I have tried to use 'Control source' on the data panel, but with no success. Any way I can get Dynamic Images to show up on each database.

Also, I have a couple of Relational Databases.

One Defines Values:

For Example:

DefinePets('petID','Name of Pet')

The other one links the Main DB with the 'DefinePets' database.

Eg:

connect('petID','mainID','extraFeild')

I'd like my report to Go into the "connect" Table, where the the currently viewed Record Value = mainID, then find petID and return Name of Pet.

There is a many to many link between definePets and the main Table. (Therefore connect is joining them up)

Or is that too much to ask from a simple package like Access?

share|improve this question

1 Answer 1

You need to do it with an unbound picture control with no Picture property defined (to create it you have to point it at a picture, but you can delete the filename after you insert it). Stephen Lebans provides code to load a picture file into an unbound picture control on his website.

Here are the steps to do it:

  1. in the detail of your report, add a hidden control with the ControlSource of the field that stores your filename.

  2. add the unbound picture control and delete the picture you pointed it out to to create it.

  3. set the unbound picture control's properties appropriately for sizing (zoom is the usual setting, but if your pictures are all the same size, you can set it to Clip).

  4. in the OnFormat event of the detail, you'd use the Lebans code to load the picture. I mocked up a test for this, and the line of code looks like this:

    fLoadPicture Me!imgPicture, Me!PicturePath, False

"fLoadPicture" is the Lebans function, "imgPicture" is the unbound picture control, and "PicturePath" is the name of the field storing the file name of the picture to display. It should also be the name of the hidden textbox bound to that field.

share|improve this answer
    
OnFormate Event? I can't find anything like that in the Property sheet. –  user37900 May 22 '10 at 0:31
    
Typo -- it's the OnFormat event of the Detail. Given that there's only 3 events on the Detail, that should have been fairly easy to figure out! –  David W. Fenton May 22 '10 at 16:59
    
Also no onFormat. Online OnClick, OnDoubleClick, onMouseOver, onMouseOut. –  user37900 May 23 '10 at 5:03
    
When I view the EVENTS tab of the Detail of a report, I see three events, On Format, On Print and On Retreat. How are you looking at the events of the detail of your report? –  David W. Fenton May 23 '10 at 21:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.