Solved

Convert report to PDF

Posted on 2014-12-28
10
188 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
  • 6
  • 2
  • 2
10 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 250 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 250 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
 

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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 39

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
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…
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.

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