Results 1 to 7 of 7
  1. #1
    Rataplan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2014
    Posts
    4

    Question How to display images from an http:// path in a report

    Hello,

    I am creating a database for a customer. I have a database to show different products. I would like to show an image (picture) of each product in a report. The database contains a report-index on which the customer can choose
    what product to see. So when he clicks "product A", a report opens with data from "product A"and the image and when the customer chooses "product B" the same happens but then with data and the image of product B, etc. As this image has to change with every choice made in the index, I created a table with the different images paths. I used the instructions shown in the following link:

    http://support.microsoft.com/default...%2Dus%3B285820

    I followed the instructions step by step and it is working wonderfully on my C-drive. However the database needs to be located on a SharePoint website, so I followed the step that says: "Use an http:// path in a form". Also this works but I would like to have it in a report as well; this is what the customer will see, the report and not the form. I could not figure out how to make this work in a report. I looked online for solutions but could not find one.


    So my first question: Is it possible to add this feature in a report? And if yes, how can I add this?

    To avoid spending more time on this problem, I added the form with the images in the report as a subform. Also this works but only in report view and not in print preview. In print preview the subform stays blank and shows nothing at all. Again I looked online why the image in the subform in the report stays blank. Some say: "use a report, as a form is used to enter data and not used for showing and printing data". But as I could not figure out how to use the image web browser control feature in a report I had no choice but to use a subform. Somebody else said:"If there is no data in a form, it will show blank too".
    I tried with compressed images as I thought that the size might be the problem, but it did not work. The size of the images is not more than 40kByte, that is not large.

    My second question is: Is it possible that the image is not seen as "data"?
    My third question is: How can I get the image shown in print preview?

    The reason that I used VBA code is:

    1. I followed the recommendations regarding storing and showing images in forms, reports and controls as indicated in the link below and using VBA made the most sense to me for this particular case.
    2. OLE objects only work with a certain type of image (.dib and .bmp) and not JPG, which I am using. I cannot reinstal the Photo Editor as indicated in the recommendations as I have no rights to install software on my
    computer.

    http://office.microsoft.com/en-ca/access-help/use-images-in-your-access-forms-reports-and-controls-HA001147204.aspx

    I hope someone can answer my questions.




  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I have always used "format" event handlers to dynamically assign values to controls in reports.

  3. #3
    Rataplan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2014
    Posts
    4
    Hi ItsMe, thanks for your response. I do not know what you mean by using "format" event handlers. Could you give me a bit more information or an example. Thanks.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    In design view, you can highlight a section of your report, much like you would for a control. For instance, clicking the page footer would set focus on that section and then you can go to its properties by viewing the property sheet. In the property sheet's event tab there are several fields that describe different handlers. You can create a VBA event handler by clicking the ellipses (...) next to the desired event and selecting the "Code Builder" option.

    You can create your code within the new handler.

  5. #5
    Rataplan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2014
    Posts
    4
    Thanks for your response. I understand what you mean now. I use this on a regular basis too but I am still stuck with how to get the WebBrowser Control to work in a report when the path of the images are on a website (http:// path).

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Web objects created in Access do not have all of the functionality of client DB objects.

    I am imagining you have a control on a report that needs to be updated with dynamic information. I would approach this the same as any other control until after I discovered a specific approach does not work.

    If you hard code a path, does a picture appear in print preview? If so, it seems to be a matter of passing the dynamic value to the format event handler. Perhaps you can use DAO in the Open handler to retrieve the literal text of the path and assign it to a variable that is public to the Report's class module. (declare string in the header of the module)

  7. #7
    Rataplan is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2014
    Posts
    4
    Thanks. I will check what you suggested and see if I can use DAO as you mentioned.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Display images in a calendar report?
    By hinsdale1 in forum Reports
    Replies: 5
    Last Post: 04-25-2013, 01:37 PM
  2. Replies: 5
    Last Post: 10-25-2011, 09:47 AM
  3. images won't display
    By merlin777 in forum Access
    Replies: 6
    Last Post: 09-02-2011, 09:02 AM
  4. Replies: 2
    Last Post: 07-31-2010, 11:45 PM
  5. Replies: 17
    Last Post: 08-26-2009, 11:27 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums