473,491 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Saving Access Reports as PDFs

7 New Member
** Edit ** This post was added to an existing thread (How to save an Access report to pdf with filename based on fieldname) in error so it's been moved here.

Hello to all again.

my little access query (see above), thanks to you, meets some great succes by other users. In that way that they would to integrate this to other entities. One of the users asked me if it was possible to modify it a little to obtain next result. So I need you high competencies again :o)

actually: selecting custumer nr from droplist, click on button, filtered report is created and saved as pdf file with given name (based on fieldname)

would like doing : instead of selecting customer nr from droplist just click on button, run report and save every entity, which appears in the report, as pdf file also with given name (based on fieldname.

Is this technically possible???

Once again thanks in advance

KR

Nicolas
Nov 30 '11 #1
5 2704
Mihail
759 Contributor
What mean "every entity, which appears in the report" ?
Automatic save a .pdf file for each customer in your list ?
Dec 1 '11 #2
nicodg
7 New Member
Hello Mihail,

Thansk for replying

First I have to refer to a previous topic: "How to save an Access report to pdf with filename based on fieldname" in which you can find som more details.

But resumed:
I need to send every month an account statement to each of our entities all over the world. Today's actionflow is:
- select customer nr from drop list ( 1 cust nr = 1 entity)
- click button which runs a code (first: filtering all information, from a global excel file, refering to the selected cust nr, Second: save output into pdf file by given it a specific name based on fieldname. (this works actually fine)

Question is:

just one click on a button, this will create an access report file considering all customer nr. Output in pdf file. But, if report shows 10 customer nr; then I need:
- 10 pdf file; one for each customer
- name of each pdf file must be/contain :"custumer nr" and "name"

Hope this will clarify a little more
Have a nice day
Dec 1 '11 #3
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
This is where looping through a recordset comes in Handy.
Expand|Select|Wrap|Line Numbers
  1. Dim rsCustomers as Dao.Recordset
  2. Dim strSQL as String
  3. dim strReportName as string
  4.  
  5. strSQL="SELECT SAP,Cust,Hyperion " & _
  6.        "FROM [Hyperion accounts] " & _
  7.        "ORDER BY [SAP];"
  8. '(This may need to have a WHERE clause applied to it)
  9. set rsCustomers=CurrentDB.Openrecordset(strsql,dbopendynaset)
  10. Do while not rsCustomers.EOF 
  11.  strReportName = rsCustomers!Cust & "-" & rsCustomers!Hyperion & ".pdf"
  12.  DoCmd.OutputTo acOutputReport, "Rep Hyperion recon", acFormatPDF, myPath + strReportName, True 
  13.  rsCustomers.MoveNext
  14. Loop
  15.  
  16. 'Cleanup
  17. set rsCustomers=nothing
  18.  
This will print ALL your customers, so you need some way to specify which customers to print, I suppose it could be based on which customers have had orders this month, but I dont really have the details to specify such a where clause.
Dec 1 '11 #4
nicodg
7 New Member
Hello to all and sorry for this (very) late reply.
Once again I have received an answer to my problem
And once again it works fine...

thanks a lot for this great Forum
Dec 6 '11 #5
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
Better late then never!

Good to see it worked for you.
Dec 6 '11 #6

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

Similar topics

1
2928
by: Joris Kempen | last post by:
Hi people, I know that the question has come around sometimes: How to open an Access Report using ASP and export it to for example RTF. I'm trying to implement the first method of David...
16
48821
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
5
2848
by: Steven Taylor | last post by:
Hope someone can help. I have an application whereby in order to create one document type I effectively print out 3 or 4 access reports in correct order. So the user goes to the printer,...
1
3186
by: Brian Barnes | last post by:
I've been searching using google trying to find a way to display Access Reports via ASP.NET and only finding commericial products which appear to require that the report needs to be converted every...
1
1435
by: David | last post by:
Does anyone know how to run MS Access reports from VB.net. I'd like to keep the existing reports in the database if I can. Thanks David
0
1400
by: dkurtz | last post by:
D. Lesandrini published an article some time ago about exporting Access reports as XML, and then updating those XML reports dynamically in ..NET....
16
6485
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report,...
1
2025
by: NeoDeGenero | last post by:
I have a little VBA/Access - Reports problem and I’m not sure on how to approach it: I am trying to send a Report generated by MS Access via email through the command SendObject. ...
0
2304
by: Qtip23 | last post by:
Hello All, So I have a my database information placed on a SharePoint site now that there is an immediate need for a web-based application in my division. I am able to print Access Reports...
3
7663
by: shimul | last post by:
Hi All, I am trying to combine multiple access reports in one PDF using pdfcreator, however it doesn't work for me... Can you please check the following code: Sub...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.