473,419 Members | 1,647 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,419 software developers and data experts.

How to vary the number of copies of each record in a report in A97?

MLH
I have a source query (qryITSLetterList) feeding rows containing name,
addr, city, state, zip and VehicleID to a report (rptITSnotices). The
query may contain 1-to-5 records resulting in 1-to-5 sheets of paper
coming out of the printer. The report is a form letter. Each row in
the source query results in a single page letter being printed.

Suppose I could include a field in the query [CopiesDesired]. The
value in this field would be from 1-to-4. So if running the query
produced 1 output row, three sheets of paper would print if the
value in the [CopiesDesired] field of that row was 3. Likewise, if
the query dynaset contained 3 rows and the [CopiesDesired] field
values in the rows were 2, 1, 3 respectively - 6 sheets of paper
would exit the printer.

What report property could I set to print varying numbers of copies
when each row was printed? Or, if I'm chasing a pipe-dream, what
method could I employ to produce the desired results?
Dec 18 '05 #1
9 1615
MLH wrote:
I have a source query (qryITSLetterList) feeding rows containing name,
addr, city, state, zip and VehicleID to a report (rptITSnotices). The
query may contain 1-to-5 records resulting in 1-to-5 sheets of paper
coming out of the printer. The report is a form letter. Each row in
the source query results in a single page letter being printed.

Suppose I could include a field in the query [CopiesDesired]. The
value in this field would be from 1-to-4. So if running the query
produced 1 output row, three sheets of paper would print if the
value in the [CopiesDesired] field of that row was 3. Likewise, if
the query dynaset contained 3 rows and the [CopiesDesired] field
values in the rows were 2, 1, 3 respectively - 6 sheets of paper
would exit the printer.

What report property could I set to print varying numbers of copies
when each row was printed? Or, if I'm chasing a pipe-dream, what
method could I employ to produce the desired results?


I won't test it (too much futzing around) but I'd recommend you look at
MoveLayout, NextRecord, PrintSection Properties in help.

I might create a global variable called intCopyCnt. Set the initial
value to 1. Increment CopyCnt by 1 in a footer band. Then I'd compare
it to the CopiesDesired value to the intCopyCnt var in the detail band.
Set NextRecord to False if CopiesDesired greater/= intCopyCnt or True
if less than intCopyCnt.

You will need to futz around with the NextRecord property and setting
your breakpoints (you may find a footer band for detail will assist) but
it should be able to handle your problem.
When Copy increment the count by 1. If equal, reset the counter to 1.
In the header, I might compare the CopiesDesired to the intCopyCnt
variable.
Dec 18 '05 #2
On Sun, 18 Dec 2005 13:02:52 -0500, MLH <CR**@NorthState.net> wrote:
I have a source query (qryITSLetterList) feeding rows containing name,
addr, city, state, zip and VehicleID to a report (rptITSnotices). The
query may contain 1-to-5 records resulting in 1-to-5 sheets of paper
coming out of the printer. The report is a form letter. Each row in
the source query results in a single page letter being printed.

Suppose I could include a field in the query [CopiesDesired]. The
value in this field would be from 1-to-4. So if running the query
produced 1 output row, three sheets of paper would print if the
value in the [CopiesDesired] field of that row was 3. Likewise, if
the query dynaset contained 3 rows and the [CopiesDesired] field
values in the rows were 2, 1, 3 respectively - 6 sheets of paper
would exit the printer.

What report property could I set to print varying numbers of copies
when each row was printed? Or, if I'm chasing a pipe-dream, what
method could I employ to produce the desired results?


Use a cartesian join.
Create a table tblCopies with a single field (CopyNo).
Include this table in the recordsource of the report (with no joins to any other table).
Before the report prints seed tblCopies with one record for each copy required. ie If the user wants 3 copies, add 3
records to tblCopies.

When the report is run, because it's recordsource cannot determine any relationship between tblCopies and any other
table in the recordsource, a duplicate row will be produced for each record in tblCopies. This will result in x copies
of each record printed.

Wayne Gillespie
Gosford NSW Australia
Dec 19 '05 #3
MLH
>
I won't test it (too much futzing around) but I'd recommend you look at
MoveLayout, NextRecord, PrintSection Properties in help.

I might create a global variable called intCopyCnt. Set the initial
value to 1. Increment CopyCnt by 1 in a footer band. Then I'd compare
it to the CopiesDesired value to the intCopyCnt var in the detail band.
Set NextRecord to False if CopiesDesired greater/= intCopyCnt or True
if less than intCopyCnt.

You will need to futz around with the NextRecord property and setting
your breakpoints (you may find a footer band for detail will assist) but
it should be able to handle your problem.
When Copy increment the count by 1. If equal, reset the counter to 1.
In the header, I might compare the CopiesDesired to the intCopyCnt
variable.

Salad, there's no A97 sample code in the HELP on these properties.
Have you looked at any on the web you think is particularly helpful?
Dec 19 '05 #4
MLH wrote:
I won't test it (too much futzing around) but I'd recommend you look at
MoveLayout, NextRecord, PrintSection Properties in help.

I might create a global variable called intCopyCnt. Set the initial
value to 1. Increment CopyCnt by 1 in a footer band. Then I'd compare
it to the CopiesDesired value to the intCopyCnt var in the detail band.
Set NextRecord to False if CopiesDesired greater/= intCopyCnt or True
if less than intCopyCnt.

You will need to futz around with the NextRecord property and setting
your breakpoints (you may find a footer band for detail will assist) but
it should be able to handle your problem.
When Copy increment the count by 1. If equal, reset the counter to 1.
In the header, I might compare the CopiesDesired to the intCopyCnt
variable.


Salad, there's no A97 sample code in the HELP on these properties.
Have you looked at any on the web you think is particularly helpful?


I've used PrintSection, MoveLayout, and NextRecord quite a few times.
But it usually takes some futzing.

For help, I usually go to http://groups.google.com/advanced_search?hl=en.

I enter my keywords...in this case
PrintSection NextRecord
and in the groups box I enter
*access*
and I came up with lots of hits. Here's one. Don't know if this will
wordwrap.
http://groups.google.com/group/micro...e128708292cb3e
Dec 19 '05 #5
MLH
sorry, I should-a-googled first.
Dec 19 '05 #6
Wayne Gillespie <be*****@NOhotmailSPAM.com.au> wrote in
news:an********************************@4ax.com:
Use a cartesian join.
Create a table tblCopies with a single field (CopyNo).
Include this table in the recordsource of the report (with no
joins to any other table). Before the report prints seed tblCopies
with one record for each copy required. ie If the user wants 3
copies, add 3 records to tblCopies.


Actually, wouldn't it make sense to have the table prepopulated with
a single field with values 1, 2, 3, 4, 5, 6..., and then you'd have
a WHERE clause on that table <=3 for 3 copies, =1 for 1 record, and
so forth.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 19 '05 #7
On Mon, 19 Dec 2005 14:15:49 -0600, "David W. Fenton" <XX*******@dfenton.com.invalid> wrote:
Wayne Gillespie <be*****@NOhotmailSPAM.com.au> wrote in
news:an********************************@4ax.com :
Use a cartesian join.
Create a table tblCopies with a single field (CopyNo).
Include this table in the recordsource of the report (with no
joins to any other table). Before the report prints seed tblCopies
with one record for each copy required. ie If the user wants 3
copies, add 3 records to tblCopies.


Actually, wouldn't it make sense to have the table prepopulated with
a single field with values 1, 2, 3, 4, 5, 6..., and then you'd have
a WHERE clause on that table <=3 for 3 copies, =1 for 1 record, and
so forth.


Whatever rocks your boat.

Wayne Gillespie
Gosford NSW Australia
Dec 19 '05 #8
Wayne Gillespie <be*****@NOhotmailSPAM.com.au> wrote in
news:pl********************************@4ax.com:
On Mon, 19 Dec 2005 14:15:49 -0600, "David W. Fenton"
<XX*******@dfenton.com.invalid> wrote:
Wayne Gillespie <be*****@NOhotmailSPAM.com.au> wrote in
news:an********************************@4ax.co m:
Use a cartesian join.
Create a table tblCopies with a single field (CopyNo).
Include this table in the recordsource of the report (with no
joins to any other table). Before the report prints seed
tblCopies with one record for each copy required. ie If the user
wants 3 copies, add 3 records to tblCopies.


Actually, wouldn't it make sense to have the table prepopulated
with a single field with values 1, 2, 3, 4, 5, 6..., and then
you'd have a WHERE clause on that table <=3 for 3 copies, =1 for 1
record, and so forth.


Whatever rocks your boat.


Actually, I wouldn't do either of these. I'd just use the formatting
events to control whether I moved to the next record or not. I've
got label reports that already do this, and got the code out of the
MS KnowledgeBase, but that was way back in Access 2.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 20 '05 #9
On Tue, 20 Dec 2005 15:05:15 -0600, "David W. Fenton" <XX*******@dfenton.com.invalid> wrote:
Actually, I wouldn't do either of these.


That makes me feel better ;)

Wayne Gillespie
Gosford NSW Australia
Dec 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
3
by: Tim | last post by:
Is it possible to select the number of copies of a report from a variable input in a form ? -- Tim Patton ICT Controller Springfarm Architectural Mouldings Ltd Antrim, N.Ireland
7
by: astro | last post by:
Anyone have suggestions on where to troubleshoot this error? Background: -Access 2k v. 9.0.6926 sp3 - front and backend on production server (wiindows 2k) -accessed via Citrix -front-end is...
2
by: Smriti Dev | last post by:
Hi, I am creating a form that allows users' to enter dates and times staff are available for work. They are 2-3 different types of staff. For example, permanent staff that work M-F 9-5 pm...
0
by: Scott | last post by:
I need to have a field to generate the report number with the following format:- The first part consists of four digits for each year. It could be obtained from the date field entered manually....
4
by: bmdavis | last post by:
Hello, Currently I have a form that I want to print, 5 times for each AUTONUMBER I specify (i.e. print #654 5 times). I have created 5 reports, each with a different header/footer according to my...
1
by: Dixie | last post by:
I have 4 fields (byte) which can each contain a number between 1 and 40 odd.. The numbers in each of the fields represents the same information that can occur in one of 4 places. In each set of...
1
by: tcloster | last post by:
I have a form created from one table, the form has a lookup which finds products as the user types the product name in. When the user selects lookup record it gets loaded into the form. What I am...
1
by: ccmanc68 | last post by:
I would like to print two reports a once. The first report is a sign sheet; the second is an order form. The sign sheet contains the same information as the order form but has a different layout. ...
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.