拆分多页的MS Access报告为根据客户ID单独的PDF文件? [英] Splitting a Multi-Page MS Access report into individual pdf files based on a Customer ID?

查看:172
本文介绍了拆分多页的MS Access报告为根据客户ID单独的PDF文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待了分割多页的报告的访问将基于客户ID单独的PDF文件,然后根据客户的名称(或ID)拯救这些PDF文件。

I'm looking to split a multi-page access report up into individual pdf files based on a Customer ID and then saving those pdf files based on the Customer Name (or ID).

我看着'打印'/'转换'报告成一个巨大的PDF文件和分裂它在那里,但一些客户发票跨越两个+页,因此拆分一个PDF文件页逐页不能正常工作

I've looked into 'printing'/'converting' the report into one massive pdf file and splitting it there, but some customer invoices span two+ pages, therefore splitting that one pdf file page-by-page doesn't work.

任何帮助将是很大的AP preciated;如果有人需要的东西更多的澄清,不要犹豫,让我知道。

Any help would be greatly appreciated; if anyone needs more clarification on anything, don't hesitate to let me know.

推荐答案

PDF打印功能与MS Access 2010中,2007年,您可以安装一个附加的微软:<一href="http://office.microsoft.com/en-us/help/print-share-and-protect-files-in-the-pdf-and-xps-file-formats-HA010167527.aspx#_Toc290894468"在PDF和XPS文件格式相对=nofollow>打印,共享和保护文件

PDF printing is available with MS Access 2010, for 2007, you can install an add-on from Microsoft : Print, share, and protect files in the PDF and XPS file formats

有关在2007年之前的版本中,你可以使用:

For versions prior to 2007, you can use :

  • 斯蒂芬LeBan的 ReportToPDF 只包含两个DLL,但只适用于MS访问

  • Stephen LeBan's ReportToPDF consists of just two DLLs but only works with MS Access

CutePDF 是免费的,易于使用。

CutePDF is free and easy to use.

的PDFCreator 也是免费的,可以用VBA进行全自动(虽然我还没有最近使用过它,我相信这个功能仍然可用)

PDFCreator is also free and can be fully automated with VBA (though I have not used it lately, I believe this feature is still available)

任意数量的付费的PDF创建者。

Any number of paid-for PDF creators.

在何处论据的OpenReport已经可用,因为的 2003版(也的OpenReport 2010

The WHERE argument for OpenReport has been available since the 2003 version (also OpenReport 2010)

要在2003年的版本,2007年和2010年打印报告的所有客户,您可以通过相关的文件回路和

To print a report for all customers for version 2003, 2007 and 2010, you can loop through the relevant file and

Dim rs AS DAO.Recordset
Set rs = CurrentDB.OpenRecordset("SELECT DISTINCT CustimerID FROM Invoices")

   Do While Not rs.EOF
      ''expression.OpenReport(ReportName, View, FilterName, 
      ''      WhereCondition, WindowMode) -- 2010 has OpenArgs

      DoCmd.OpenReport "Invoices",<..>,,"CustomerID=" & rs!CustomerID
      ''OutputTo or other relevant code

      rs.MoveNext
   Loop

获取PDF文件,然后取决于您的版本和已安装的工具。如果你正在使用的PDFCreator或CutePDF,例如,你可以使用 acViewNormal 的看法。 PDFCreator的设置可以让你事先指定的文件名,CutePDF,你将不得不填补一个文件名。对于Access 2007和2010,您可以使用 OutputTo ,前面已经提到过,所以 acView preVIEW 是最好的。

Getting a PDF then depends on your version and the tools you have installed. If you are using PDFCreator or CutePDF, for example, you can use acViewNormal for the view. PDFCreator set up will allow you to assign a file name in advance, for CutePDF, you will have to fill in a file name. For Access 2007 and 2010, you can use OutputTo, as has already been mentioned, so acViewPreview is best.

要通过电子邮件发送的报告,2007年和2010年,你可以使用的使用SendObject 。对于早期版本,则需要相当多的code。最简单的方法可能是Outlook自动运行。

To email a report for 2007 and 2010, you can use SendObject. For earlier versions, you will need quite a bit more code. The easiest option is probably to automate Outlook.

这篇关于拆分多页的MS Access报告为根据客户ID单独的PDF文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆