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

Print check report, double stub

8
Using Access 97, how do I avoid printing multiple copies of a check when the subreports used for the check stubs have multiple records (like when I want to pay several invoices with one check)? If I eliminate one of the stub subreports, then it prints a single check even when there are multiple records (invoices) in the one stub's subreport.
Nov 24 '07 #1
6 3309
MMcCarthy
14,534 Expert Mod 8TB
Hi Fresco

This sounds like a problem with your structure. Your table of checks issued should not have multiple records and should have a one to many relationship with your invoices table in that the invoices table would contain a foreign key relationship to your checks table.

If you have this then you need to give more information about how you have structured your report. What query is your main report based on and what queries are your subreports based on?
Nov 27 '07 #2
Fresco
8
mmccarthy;

I haven't set the relation to check# yet. I just wanted to get the check printing feature working first. So, the only one to many that might be effecting the report would be with the vendor and bills tables.

CheckRpt gets its controls filled from the same query as the two check stubs which are subreports. The sub reports are designed to produce two stubs that list each of the invoices I'm paying with this check. The query, CheckStubQry gets its records from tblVendor and tblBills with the following structures:

tblVendor
VenID auto
PayTo text (name of vendor)

tblBills
ID auto
VenID lookup (to tblVendor)
Ref# text (invoice#, etc)
Amount currency
PayNow Yes/No
Paid date

The query asks for the PayTo parameter allowing me to select a single vendor. It has "Yes" as criteria for PayNow and IsNull for Paid. This gives me a listing of all invoices for that vendor that I wish to pay at this time. I select the "Yes" for PayNow in a previous form so that I can pay only selected invoices.

In the query, I've set the relationship between the two tables to include all records from tblBills and only those with matching data in the join fields in tblVendor.

When I print, the check and two attached stubs work perfect if there is only one record (invoice) included in the payment. If, however, there are two, then the two stubs print again on a second sheet without the controls from the main report (eg; the check portion of the report). The number of extra sheets it prints is always one less than the number of records I'm including in this check.

The goal is to print only the one sheet with check at the top and two stubs, one in the middle and one at the bottom.

The only thing I haven't tried, but might work is to create a macro (or write some code which I'm still new at) to create a temporary table that has just the info I want to show up on this check and use that as the source for the stubs. Intuitively, the problem has something to do with the jet engine cycling through the query repetitively since there are two stubs (sub reports) and not just one.

To date I've tried using different queries for the main report and stubs and that doesn't work either.

Thanks much for your interest in helping.

Fresco
Dec 1 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
OK you need to look at grouping on the report

Create a group header for Vendor and put all the information that should only appear once. Then put the invoice information in the detail section with the subreport(s).
Dec 1 '07 #4
How I deal with this in the accounting systems is that I set the size of the sub report that list the invoices to a be fixed size with Can Grow and Can shrink set to No.

In the On Format event for the detail section, I use VBA code to check to see how many records are in the sub report (count of invoices to print). If there are more lines than will fit in the stub, then I hide the sub report and display a label "See attached summary". Then I print a report that lists all the invoices for the check.

Hope this helps ...

Boyd


Using Access 97, how do I avoid printing multiple copies of a check when the subreports used for the check stubs have multiple records (like when I want to pay several invoices with one check)? If I eliminate one of the stub subreports, then it prints a single check even when there are multiple records (invoices) in the one stub's subreport.
Dec 1 '07 #5
Fresco
8
mmccarthy,

I set up a grouping for the Check Report and couldn't get it to work. It still printed multiple copies of the two subReports equal to the number of invoices I was paying.

But your idea got me to thinking. Maybe the problem was in the main report, not the subReports. So I changed the data source for the main report so that it was unbound. I then referenced the three controls in the report header to the form that launched the report (Vendor name, written check amount and check total). This WORKED !!!!

By the time I got something to work, I was using a grouping level. So, out of curiosity, I went back to the other layout where the controls that print the check (the main report) were in the page header as originally set up. It still works that way.

Many thanks for the push in the right direction.

Fresco
Dec 3 '07 #6
Fresco
8
HiTechCoach,

I wondered how to deal with the overflow. If it looks like I'll need it, I'll give your solution a try. Historically, the most I think I've had to pay at one time is five invoices, which will fit with room to spare in the check stub area. But the day will come.....

Fresco
Dec 3 '07 #7

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

Similar topics

1
by: Richard Hollenbeck | last post by:
I noticed I can't push a value into a text box by saying something like, "txtThisTextBox = intSomeVariable * 0.5" because I get an run-time error saying I can't assign a value to this object....
10
by: MLH | last post by:
If I wanted 2 of each page, could I make them print out 2 of first page, 2 of second page, 2 of third page, 2 of fourth page and 2 of 5th page? Or, do I have to run the openreport method twice...
4
by: Gary | last post by:
Hello, I'm hoping someone can shed some light on why my report does not output the same results as shown in preview mode, which is to move the position of a check box based on a field value (see...
7
by: itm | last post by:
I have a mail out to send to a group of owners with multiple accounts. I want to limit the number of accounts that print on the first page to 20. I want remaining accounts to print on a second...
0
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
29
by: Virtual_X | last post by:
As in IEEE754 double consist of sign bit 11 bits for exponent 52 bits for fraction i write this code to print double parts as it explained in ieee754 i want to know if the code contain any...
6
by: mattmao | last post by:
Hi all. There is a challenge question I encountered recently, which says: "In plain English, there are six different ways when you want to tell someone else about the current time: ...
18
by: =?Utf-8?B?SGVyYg==?= | last post by:
I'm using a ReportViewer in ASP.NET. From the development environment it works fine. When published and I try to open the page with the ReportViewer I get the error: An internal error occurred...
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
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: 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
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...
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
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...

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.