Solved

Microsoft Access 2013 Output to PDF loosing Landscape

Posted on 2015-01-29
7
1,295 Views
Last Modified: 2016-02-10
I use the following code to export my report to pdf
DoCmd.OpenReport "TotalbyUserOrganization", acViewReport, "", "", acNormal
DoCmd.OutputTo acOutputReport, "TotalbyUserOrganization", "PDFFormat(*.pdf)", myfilename, True, "", , acExportQualityScreen
DoCmd.OpenReport "TotalbyUserOrganization", acViewPreview, "", "", acHidden

Open in new window

This works fine except for all non landscape reports but when I used this code for my report that requires landscape it prints to adobe on portrait. The report view is correct. Do I need VBA code for landscape. I have searched and have not found an answer for this. This is Microsoft Access 2013. Thanks for the help.
0
Comment
Question by:marlind605
  • 4
  • 2
7 Comments
 
LVL 28

Assisted Solution

by:omgang
omgang earned 250 total points
ID: 40578349
Thinking it's the acExportQualityScreen parameter.  You're telling it to optimize output for the a screen device.
See https://msdn.microsoft.com/en-us/library/office/ff192065(v=office.15).aspx
OM Gang
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 250 total points
ID: 40578824
Your code, though I modified it slightly, worked fine as-is and gave me a Landscape PDF for a Landscape Report:

DoCmd.OpenReport "rptYourReport", acViewPreview, , , acHidden
DoCmd.OutputTo acOutputReport, "rptYourReport", "PDFFormat(*.pdf)", "C:\YourFolder\Test.pdf", True, "", , acExportQualityScreen
DoCmd.Close acReport, "rptYourReport"

BTW, I am using Access 2010, so you (using 2013) might want to make sure you have all you Updates installed for Windows and Office.

JeffCoachman
0
 

Author Comment

by:marlind605
ID: 40579627
Thanks for both of the replies. OM Gang, I tried acExportQualityPrint and I get the same thing. The thing of it is I have 3 reports printing in landscape and I am only having trouble with 1.  jeffCoachman, I tried your solutions saving one of my good reports as a test and I get an output cancelled error. Any other thoughts for this problem?
0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

Accepted Solution

by:
marlind605 earned 0 total points
ID: 40579992
I did some more searching and found the solution. I changed the page setup columns width to 10.75 same as on the report and it worked. Not sure why I had to do that. I spent way to much time on it.
0
 

Author Comment

by:marlind605
ID: 40580002
I did some more searching and found the solution. I changed the page setup columns width to 10.75 same as on the report and it worked. Not sure why I had to do that. I spent way to much time on it. Thanks for the assist.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40580518
Oh,
You did not state you had columns setup for his report...

Glad you got it figured out.
;-)

Jeff
0
 

Author Closing Comment

by:marlind605
ID: 40588216
Not sure if I am doing this correct but I did find the solution and I learned something from the other two comments. Thanks.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

911 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

22 Experts available now in Live!

Get 1:1 Help Now