473,549 Members | 2,935 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

MLH
I have a source query (qryITSLetterLi st) 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 1626
MLH wrote:
I have a source query (qryITSLetterLi st) 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**@NorthStat e.net> wrote:
I have a source query (qryITSLetterLi st) 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*****@NOhotm ailSPAM.com.au> wrote in
news:an******** *************** *********@4ax.c om:
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*******@dfen ton.com.invalid > wrote:
Wayne Gillespie <be*****@NOhotm ailSPAM.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*****@NOhotm ailSPAM.com.au> wrote in
news:pl******** *************** *********@4ax.c om:
On Mon, 19 Dec 2005 14:15:49 -0600, "David W. Fenton"
<XX*******@dfen ton.com.invalid > wrote:
Wayne Gillespie <be*****@NOhotm ailSPAM.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.


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*******@dfen ton.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
3689
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 a spreadsheet might show, the column names will actually be dynamic, based on data from a SQL Server 2000 database. The row data will also come...
3
1882
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
7233
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 mde, backend is mdb -only occurs on the production server -only occurs with mde verson - i've tested the problem with the mdb version of the...
2
2290
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 generally and then contract and volunteer staff that work on particular days and timings I am not sure how to design the form so that users' are able to...
0
1509
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. The second part consists of four digits for the report number of the year. It should be generated automatically when a record is created. The...
4
2519
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 needs. How do I create a button/macro/command to print ALL 5 according to the Autonumber I select? In other words, for each record I want to print...
1
1331
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 4 (which would represent 1 record), each number can only occur in 1 of the 4 fields, it cannot be in the one record twice. I need a report that...
1
1551
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 trying to do is have the user select the record and load it into the form (acheived this so far), then click a print preview button and be prompted to...
1
2254
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. The subform sometimes contains multiple records, currently if I have four records in the subform, and when I print these reports, it will print the...
0
7518
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7715
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7956
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7469
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6040
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1935
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 we have to send another system
1
1057
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.