Solved

Print Preview won't make PDF file with all pictures in the PDF file

Posted on 2014-09-15
5
484 Views
Last Modified: 2014-09-17
I have the following code in an onclick event of a command button.  The problem is that if I do a print preview of the report all of the pictures print on the report.  (There are 5 in total).  But when the report gets send to a PDF file only 3 of the pictures are there.  Two are missing.

Here is the code:

   
Dim strClientFolderName As String
    Dim strFilter As String
    Dim strPropertyAssetFolderName As String
    Dim strPropertyFolderName As String
    Dim strReportName As String

    strClientFolderName = TempVars!strPicturesDataPath & "\" & Trim(Me.cboClientName) & "\"
    strPropertyFolderName = strClientFolderName & Trim(Me.cboProperty) & "\"
    strReportName = "Asset Detail Report"
    
    If Not IsNull(Me.cboFilterBySelectionAsset) Then
        strFilter = "AssetN = " & Me.cboFilterBySelectionAsset
    End If

    DoCmd.OpenReport strReportName, acViewPreview, , strFilter, acHidden
    DoCmd.OutputTo acOutputReport, strReportName, acFormatPDF, strPropertyFolderName & strReportName & ".pdf"
    DoCmd.Close acReport, strReportName, acSaveNo

    FollowHyperlink strPropertyFolderName & strReportName & ".PDF"

Open in new window

0
Comment
Question by:SteveL13
  • 2
  • 2
5 Comments
 
LVL 34

Expert Comment

by:PatHartman
ID: 40325379
Have you tried printing other records?  Is it always the same two controls that are empty?  Will those two pictures print if they are assigned to different controls?  Are the two pictures a different format from the ones that do print?
0
 

Author Comment

by:SteveL13
ID: 40325480
Here's the latest on this quirk.  All of the picture files are jpg file.  But get this...

I can run the report one time and all of the pictures do not appear in the pdf file.  The next time they may all appear.  They always all appear in the print preview.

?????????

Is driving me crazy!
0
 
LVL 26

Accepted Solution

by:
Nick67 earned 500 total points
ID: 40325641
I take it that images are very large?
There are limits to what Access is willing to do with large images on reports.
They can be worked around.
I have an article (actually two) on the subject
http://www.experts-exchange.com/Database/MS_Access/A_13519-Printing-many-large-images-in-MS-Access-reports.html
and
http://www.experts-exchange.com/Database/MS_Access/A_13779-More-Fun-with-Really-Large-High-Fidelity-Images-in-Access-Reports.html

To test and for fun, resize your images down until they are 200 dpi -- that is to say that if the control that displays them is 4 inches by 3 inches, resize the images to 800 x 600 pixels.

Do they then render to PDF?
I'll betcha they do.
If so, then have a look at my articles on the subject.

Nick67
0
 

Author Comment

by:SteveL13
ID: 40325716
How can I resize them down to 200 dpi?
0
 
LVL 26

Expert Comment

by:Nick67
ID: 40325765
Pick your poison.
How large are the originals?
How large are the controls?

For quick and dirty (it doesn't need to be exactly 200 dpi) use resize in MSPaint!
Figure out by what percentage you need to shrink them and have at 'er.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now