473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

How to generate report to a pdf format

Can anyone give me an idea how to generate an Access 2007 report to a pdf format? For example, I created a Kform which will show 50 names in the form, and user will click on the checkbox to do a selection for which name that wanted to be appear in the report. Then, a Process button will be click in order to preview the report in a pdf format.

Thanks.
Really appreciate it..
Nov 25 '08 #1
9 2881
I have the same situation in a DB. There is an add on you can down load from MS.
Link below, I then output to report to that format. But you need the add on

Download details: 2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS

hope that helps
Nov 25 '08 #2
Tried to download the add-in from MS, but I can only download the Help Generator.. :(

Any other suggestions?Can I use a Macro Builder to do the task?
Nov 26 '08 #3
You cant use macro. You need this add on
I am not sure why you where not able to download as i was able to download again . You have to go through all of the validation steps etc.
Possibly try again
Sorry
Nov 26 '08 #4
Ok..now i can download the save as pdf from MS..so i need to do the coding to make it works, right?the thing is, im not familiar with vba..can help me with that?
Nov 27 '08 #5
I've created this hotel list form to show hotel list in a region together with the code & a checkbox to do a selection. When user click the checkbox, let say 5 hotels, then user will click the Process cmd button in order to view the selected hotels. The output is like the image below..



http://www.geocities.com/crucial_fake/report.JPG

The question is, how can i do that?Somebody help me please. I already install the add in for save as pdf from MS.Thank You..
Nov 27 '08 #6
What is the data source for the report? Are you only using the hotel name as criteria?
Dec 16 '08 #7
"Then, a Process button will be click in order to preview the report in a pdf format. "

Even if it's an old post (Nov 25 '08) and because it appears on google search and has no best answer yet, I have another possible answer:

1). In your OS (windows) install a virtual PDF printer (I use PDFCreator)
2). Make sure that the PDF Printer is set to display the .pdf file ! (in PDFCreator, set the options to automatically save the .pdf file into a specific folder - it could be temp folder - and then check that checkbox to open the saved .pdf file).
3). In Access, duplicate that report (let's say "Kreport" duplicated with the name "KreportPDF")
4). In Access on that duplicated report (KreportPDF) set as a specific printer that PDF printer: "Page Setup" -> "Page" -> "Printer for KreportPDF" -> "Use specific printer" -> "PDFCreator" (in my case)
5). In Access on that Kform make a button (ProcessButton) with the on click's properties to print the "KreportPDF".

PS: I dont know why, but on this case (PDF creator), the program (PDFCreator.exe) must be started to "print/save" the .pdf file. So I added this command to open the PDFCreator.exe minimized (tray zone): Call shell("C:\Program Files\PDFCreator\PDFCreator.exe, vbMinimizedNoFocus) after the print report command. The button code looks like this:

Expand|Select|Wrap|Line Numbers
  1. Private Sub ProcessButton_Click()
  2. On Error GoTo Err_ProcessButton_Click
  3.     Dim StLinkCriteria As String
  4.     Dim StAppName As String
  5.     DoCmd.OpenReport "KreportPDF", acNormal, , StLinkCriteria
  6.     Call shell("C:\Program Files\PDFCreator\PDFCreator.exe, vbMinimizedNoFocus)
  7. Exit_ProcessButton_Click:
  8.     Exit Sub
  9. Err_ProcessButton_Click:
  10.     MsgBox Err.Description
  11.     Resume Exit_ProcessButton_Click
  12. End Sub
Jul 17 '13 #8
I use this in my 2007 access database to put pdf's of my reports on the network.

Expand|Select|Wrap|Line Numbers
  1.     DoCmd.OpenReport  report_name, acPreview, , , acHidden
  2.     DoCmd.OutputTo acOutputReport, report_name, acFormatPDF,  filename  , True
  3.     DoCmd.Close acReport, report_name, acSaveNo
  4.  
Jul 17 '13 #9
zmbd
5,501 Expert Mod 4TB
Please keep in mind that this is a VERY old thread.
Unless you have the add-in as mention in post #2
OR
which I believe was incorporated into one of the service packs installed, then the option as given in post #9 more than likely will fail.

Microsoft originally wanted you to purchase Adobe Acrobat on your own:
---
Save as PDF
Applies to:
Access 2007, Excel 2007, OneNote 2007, PowerPoint 2007, Publisher 2007, Visio 2007, Word 2007
What is PDF format?
Portable Document Format (PDF) ensures your printed or viewed file retains the formatting that you intended. The PDF format is also useful if you intend to use commercial printing methods.

Important

Don't have the PDF option? Download and install Acrobat from Adobe Systems.
To view a PDF file, download and install Adobe Acrobat reader on your computer from Adobe Systems. Click Get Adobe Reader.
To create PDF files, download and install Acrobat from Adobe Systems.
---Note: I've disabled the links to Adobe's site in the above quote. With the release of the add-in, the above information is now obsolite.---

However, it appears that with the release of V2010 MS saw the light, realizing the people were simply going out to the internet and finding CHEAPER (!) software, shareware, and freeware instead of Adobe's software and finally released the add-in for V2007.

: to build on post #8
Many third party PDF venders have a PDF printer driver; thus:
Install the third party PDF printer driver
Set the PDF printer as default.
Now send the open report to the now default PDF printer as you would normally from within VBA. No need to shell to the program unless needed for other reasons.
Jul 17 '13 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Brian Kwan | last post by:
Project Description: Develop a web application to help manage sale operations. There is a function that to generate a report using data in database, which is a Word document on server and let user...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
1
by: corlo | last post by:
I'm working on an aplication with PHP and MySQL, but I need to generate reports from a database to be printed on a specific format. I need to generate graphics from the database and print them. Its...
0
by: imranabdulaziz | last post by:
Dear All, I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2005 as a back End. My question Is it possible to generate report in hindi (language) format( using...
5
by: =?Utf-8?B?a3Jpcw==?= | last post by:
I created a simple webservice .asmx on Visual Studio 2005. As I plan to deploy it to Sharepoint Portal 2003, I copied asmx to \web server extensions\60\ISAPI directory of the server, where all...
21
by: Grant Edwards | last post by:
I need to be able to generate a PDF report which consists mostly of vector images (which I can generate as encapsulated Postscript, PDF, or SVG). What I need is a way to combine these figures...
2
by: Shailja | last post by:
Hello, I have developed Drug Management Software in VB. Now I want to generate one report showing the list of all medicine name, Qty, Expiry Date etc. using Crystal Report. Format would be...
0
by: Wes Groleau | last post by:
Is there a reasonably simple way to dump an SSRS report into Excel format automatically at a scheduled time without using Report Manager/Report Server? Creating the report was easy, but we seem...
4
by: Nick | last post by:
I have a critical requirement where I need to club together 4 xml files and display them in an sibngle HTML report. The xmls are generated by Java application by a normal file I/O. Is there a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.