Solved

Microsoft Access 2013 Output to PDF loosing Landscape

Posted on 2015-01-29
7
1,242 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

747 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

10 Experts available now in Live!

Get 1:1 Help Now