Solved

Microsoft Access 2013 Output to PDF loosing Landscape

Posted on 2015-01-29
7
1,519 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Familiarize people with the process of utilizing SQL Server views 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 Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

732 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