473,382 Members | 1,377 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.

Print Individual Reports to Pdf using loop

Hi, I'm desperate. I've been trawling through this and other forums but still can't work out what to do. I've seen similar questions but my lack of code knowledge has stopped me working this out myself.
I have a report to update clients on the status of work we are doing for them. I need to automatically create individual reports for each client showing updates from the previous month.
The report is called: rMRClient
The query it is based on is: qMRClient
I want a separate report printed to pdf for each different client, the field identifying the different clients is: Company
I want the records for the previous month (eg. this month is January 2007 but I want the report sent out now with results where the CommentDate was December 2006).
At the moment I have to open the report, using the query to individually select the Company and month. It is obviously too cumbersome to do this 100 times each month!
Looking forward to your help...
Jan 2 '07 #1
3 10016
MMcCarthy
14,534 Expert Mod 8TB
Hi, I'm desperate. I've been trawling through this and other forums but still can't work out what to do. I've seen similar questions but my lack of code knowledge has stopped me working this out myself.
I have a report to update clients on the status of work we are doing for them. I need to automatically create individual reports for each client showing updates from the previous month.
The report is called: rMRClient
The query it is based on is: qMRClient
I want a separate report printed to pdf for each different client, the field identifying the different clients is: Company
I want the records for the previous month (eg. this month is January 2007 but I want the report sent out now with results where the CommentDate was December 2006).
At the moment I have to open the report, using the query to individually select the Company and month. It is obviously too cumbersome to do this 100 times each month!
Looking forward to your help...
When printing your report you will need to set criteria. The report query should return all records then when printing

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "ReportName", acNormal, , "[Company]=" & 'Your criteria here' & " AND [Month]=" & 'Your criteria here'
Mary
Jan 2 '07 #2
When printing your report you will need to set criteria. The report query should return all records then when printing

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "ReportName", acNormal, , "[Company]=" & 'Your criteria here' & " AND [Month]=" & 'Your criteria here'
Mary
Thanks Mary, but that still won't automatically loop through the Company records to product individual reports
Jan 2 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Thanks Mary, but that still won't automatically loop through the Company records to product individual reports
It will if you put it within a loop. For instance if you put the company list in a recordset and loop through each record printing one report each time.

Mary

For hints on how to use recordsets look at

Access VBA DAO recordset loop using two recordsetsThis example uses two recordsets but you will probably only need one.
Jan 2 '07 #4

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

Similar topics

0
by: Ian | last post by:
(Sorry if I have repeated this, it did not appear the first time) I have the following code on a button. The idea is that when this button is clicked it prints several reports automatically then...
3
by: gasturbtec | last post by:
i'm using access 2000 and have a form in which users can select reports with check boxes and click a print button to print out the selected reports. what i want to do now is place a text box on the...
16
by: John Baker | last post by:
HI; I feel like a fool..I put CUTE FTP in my last request for help --it should have been CUTE PDF! I have FTP on my mind because I have been working on a web based application, and somehow my...
2
by: Claudia Fong | last post by:
Hi, I have 4 reports created in Ms-access and I will use VB to print those reports. My problem is I'm not sure if I can control wich report to print.. Those reports are almost the same, what...
1
by: Michael Beck | last post by:
I need to select one of about 15 printers, which I have been able to do. Then I need to set that printer as the printer to use, run a Crystal Reports reports, and track if/when the printing job...
1
by: matpublic | last post by:
Hi, I'm using reporting services (localreport) to generate multiple PDF reports. These individual reports (documents) need to be printed together using different trays on the printer (Doc A...
6
by: Julian | last post by:
Hi, I am a very beginner in databases. I created a database table in Access 2003 and OOo 2.03 that includes name, address, postcode, phone numbers etc of our customers. I would like to sort...
12
by: Studiotyphoon | last post by:
Hi, I have report which I need to print 3 times, but would like to have the following headings Customer Copy - Print 1 Accounts Copy - Print 2 File Copy -Print 3 I created a macro to...
3
by: Tim | last post by:
Folks, I'm trying to format a print string so that it reports progress whilst processing a looping structure with a date time stamp appended to the end of the string. This started out life as 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
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.