Results 1 to 11 of 11
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report problem (Access 2002)

    I'm new to Access forgive me if I ask some dumb questions. I'm trying to create some quick and dirty reports to display details and pictures about certain real estate properties. I've set up my tables and created the report, I thought everything was going well, until I tried to print the report. One of the tables I set up is a Photos table, which consists of two text and one OLE Object type column. I created a form based on the Photos table and populated the OLE object using the form. For some reason when I preview or print the report, the picture doesn't print, all I get is the name of the jpeg file that I expect to be displayed. Can anyone tell me what I've done wrong or point me in the direction of a solution? Any help would be greatly appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report problem (Access 2002)

    Serious warning: don't use an OLE field to store pictures in a database. It will cause the database to grow in size very fast. The reason is that Access stores an uncompressed bitmap image of each picture in the database as well as the original format. Say you have an 800 x 600 full color picture of a house - it's a (say) 80 KB jpg image. Access will store the 80 KB jpg plus a 1875 KB bitmap!

    The best way to handle pictures is to keep them as separate files and store the path+file name in a text field in the database. Display them in forms and reports using an Image control, not an OLE control. Charlotte has posted a sample database in <post#=126927>post 126927</post#> that demonstrates how to handle this.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report problem (Access 2002)

    Thanks Hans, I'll give it a try.

  4. #4
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report problem (Access 2002)

    Based on your suggestions I've been able to get things to work in print preview, the image is displayed, but when I print it I just get a blank image control. I'm printing to a HP Officejet D135, I've never had problems with it not printing images in any other application. Is there a property that I'm missing on the image control or some printer conrol funcationality that I need to incoroporate? Any help would be greatly appreciated.

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report problem (Access 2002)

    It should work - I have attached Charlotte's demo database converted to Access 2000 format, with a report added. It prints the images on my system.

    Try if it works on your system. If it does, try to see where it is different from your report. If you can't find it, consider posting a stripped down version of your database:
    - Remove all database objects not relevant to the problem.
    - Leave only a few records in the tables - one or two should be enough to demonstrate the problem.
    - Remove or change sensitive information.
    - Compact the database, then zip it. The zip file should be < 100 KB.

    If the attached demo doesn't print the images on your system, it is not an Access problem per se - post back, other Loungers may have ideas how to solve it.
    Attached Files Attached Files

  6. #6
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report problem (Access 2002)

    Hans,

    I was using the Report_Activate and Report_Open events. I made changes to perform the assignment of the picture property in the Details_Format event based on your example. Now the first picture to be displayed is blank in print preview, it print blank, but all the remaining pages print and preview the pictures. So, I really don't now what I'm doing wrong. I didn't see the Details_Format event in my drop-down, is there a complete list of events somewhere? I've attached a copy of my db, if anyone cares to take a look?

    BTW, I appreciate the time spent by the posters here to help resolve my problem, especially all your help Hans.
    Attached Files Attached Files

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report problem (Access 2002)

    1. You don't need code in the Report_Page event - this is now causing the picture to be printed on the second and subsequent pages, but it's superfluous.

    2. The Details_Format procedure isn't connected to anything, because in your database, the name of the section is Detail (in the one I posted, it was Details), so it should be named Detail_Format. To make sure that the event procedure is recognized, click in an empty part of the detail section (or in the title bar of the section). Then, in the Properties window, activate the Events tab, and click in the On Format event. Select Event Procedure from the dropdown list, then click the Builder button (the three dots to the right). The instructions

    On Error Resume Next
    Me.imgHouse.Picture = Me.ImgTextPath

    should be in this procedure; otherwise, paste them into this procedure.

    Now, close and save the report, then open it in preview mode and print it. If you still have problems, post back.

  8. #8
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report problem (Access 2002)

    Hans,

    That got the pictures to preview and print correctly in the report. I tried to export the report to rtf and html format, but the pictures don't get exported, just the text of the report. Any suggestions?

    Thanks...

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report problem (Access 2002)

    Graphics never get exported to .rtf format (one of the weaker points of Access); I don't know about HTML.
    Can you export to a snapshot (.snp)? The snapshot viewer may be distributed freely to users not having Access.
    Or, if you have the software for it, you can export to Adobe Acrobat format (.pdf).

  10. #10
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report problem (Access 2002)

    I can export it to a snapshot file, I installed the viewer on my machine and was able to view and print the reports fine. I don't have the Adobe software, so it looks like the snapshot viewer is best option for now. Any idea on where I could get information on distributing the snapshot viewer? I checked Microsoft's site, but all I could find was info on adding the viewer to an existing install of Access.

    Thanks...

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report problem (Access 2002)

    You can download snvw90.exe (containing the snapshot viewer and a snapshot view ActiveX control) from Microsoft Snapshot Viewer Available in Download Center. You can either distribute this file, or point users to the web address.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •