?
Solved

Convert report to PDF

Posted on 2014-12-28
10
Medium Priority
?
225 Views
Last Modified: 2014-12-30
Hi EE

Using Access 2010 I have the following

DoCmd.OutputTo acOutputReport, "rptHoistFaultReport", acformatpdf, Tlocation, False

running in Window 7 all works ok but in Window 8, I get the following   "The Output to Action was Cancelled"

I have the same problem using the following in Access 2003
blRet = ConvertReportToPDF("rptHoistFaultReport", vbNullString, Tlocation & ".pdf", False, False, 150, "", "", 0, 0, 0)
in Access 2003 I don't get any error messags it just doesn't save in PDF format
Works fine under Windows 7 but not in Windows 8.

It seem the common problem is Windows 8

Any help appreciated

chestera
0
Comment
Question by:chestera
[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
  • 6
  • 2
  • 2
10 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 1000 total points
ID: 40521554
I don't see any problems with your code in Access 2010 (32 bit) in Windows 8 (64 bit)
Please, check validity and access rights of Tlocation
0
 
LVL 31

Assisted Solution

by:Helen Feddema
Helen Feddema earned 1000 total points
ID: 40521967
Try saving the PDF to the current path -- if that works OK, it is probably a security issue with the Tlocation path.
0
 

Author Comment

by:chestera
ID: 40522655
als315
There is no problem with the code as stated it works under windows 7 but not under windows 8. The Tlocation is not complex it's a test location   C:\Reports\File.pdf



Alan
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:chestera
ID: 40522660
Helen Feddema

Hi Helen

There is no problem with the code as stated it works under windows 7 but not under windows 8. The Tlocation is not complex it's a test location   C:\Reports\File.pdf

Not sure your meaning Security issue

Alan
0
 

Author Comment

by:chestera
ID: 40523134
Helen Feddema
I changed the location for testing purpose to the same folder as the .mde which is "C:\PPTworkshop" so
Tlocation becomes "C:\PPTworkshop\File.pdf" and it worked under windows 8. So you were on the right track. I will now experiment with different locations. Ultimately it will be saved to a server.


Alan
0
 
LVL 40

Expert Comment

by:als315
ID: 40523156
You should check access rights to folder  C:\Reports:
1. Select folder in explorer, press right mouse button and select "Properties"
2. Open Security tab and look at folder rights.
You should have full access rights to this folder
0
 

Author Comment

by:chestera
ID: 40523205
als315

I have found the problem.
Tlocation = "C:\PPTworkshop\Report" & Hoistnum & "FaultReport" & Tdate
Its the date that is the problem, if I remove Tdate
Tlocation = "C:\PPTworkshop\Report" & Hoistnum & "FaultReport"
It works

With the date added I get the error "The Output to Action is Cancelled"

Not sure why Tdate is a problem under Windows 8

Alan
0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 40523877
That could depend on the date format -- if it is mm/dd/yyyy, for example, the slashes will not work in a file name.  Try mm-dd-yyyy to avoid this problem.
0
 

Author Comment

by:chestera
ID: 40524297
Helen Feddema

My dates are always set,  in my case dd-mm-yyyy. Appreciated your help although a simple resolution I was going on this narrow track thinking Windows 8 was the problem not the location, until you and als315 suggested a location problem.
If you don't mind I will split the points between you and als315
0
 

Author Closing Comment

by:chestera
ID: 40524716
Thank you both for your help
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
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.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

770 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