Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Modifying Existing Check Printing Report

Status
Not open for further replies.

phoneguyWI

IS-IT--Management
Feb 28, 2013
12
US
Hi, All:

Our Accounting department uses Crystal Reports to print checks to vendors on 8.5 x 11 paper where the check is already pre-printed on the bottom third of the page. On the top third of the page, the current CR prints some page header info (CR page header section) along with a varying number of invoices and amounts (in the CR Details section) related to what the check is for. The middle third is currently blank. The CR page footer section is used to print what relevant info goes on the check. The report is grouped by check number, and the total amount of the check (the sum of the invoices) displays in the group footer. A second page is also printed that repeats the information from the first page.

I have been asked to modify the report to repeat in the middle third of the page the same invoice/amounts info as in the top third (minus the header info), with one more trick: If the number of invoices in the top third exceeds allowable space, only repeat in the middle third what fits in the top third. The remaining records would then need to print on the second page (in the top third) and be repeated in the middle third as well.

For example, let’s say up to 5 invoices are all that will fit in the top third when printed:

Here’s an example if the total # of invoices easily fits in the top 1/3rd (The same information would then also print on the second page):
----------------------------------------------------------
Top 1/3 of both pages 1 & 2:
<some check header info here>
Date Invoice # Amount
7/1/18 Invoice1 $750.00
7/1/18 Invoice2 $100.00
7/1/18 Invoice3 $250.00
----------------------------------------------------------
Middle 1/3 both pages 1 & 2:
Date Invoice # Amount
7/1/18 Invoice1 $750.00
7/1/18 Invoice2 $100.00
7/1/18 Invoice3 $250.00
----------------------------------------------------------
Bottom 1/3 both pages 1 & 2:
Pre-printed check (voided on p. 2)


Here’s an example if the # of invoices exceeds what fits in the top 1/3rd on the first page. What fits (the first 5 invoices) is repeated in the middle section of the first page. On the second page, the remaining invoices would print in the top and middle thirds:
----------------------------------------------------------
Top 1/3 of page 1
<some check header info here>
Date Invoice # Amount
7/1/18 Invoice1 $750.00
7/1/18 Invoice2 $100.00
7/1/18 Invoice3 $250.00
7/1/18 Invoice4 $300.00
7/1/18 Invoice5 $150.00
----------------------------------------------------------
Middle 1/3 of page 1
Date Invoice # Amount
7/1/18 Invoice1 $750.00
7/1/18 Invoice2 $100.00
7/1/18 Invoice3 $250.00
7/1/18 Invoice4 $300.00
7/1/18 Invoice5 $150.00
----------------------------------------------------------
Bottom 1/3 of page 1
Pre-printed check

On the 2nd page, the remaining invoices would print as follows:
----------------------------------------------------------
Top 1/3 of page 2
<some check header info here>
Date Invoice # Amount
7/1/18 Invoice6 $800.00
7/1/18 Invoice7 $400.00
7/1/18 Invoice8 $200.00
----------------------------------------------------------
Middle 1/3 of page 2
Date Invoice # Amount
7/1/18 Invoice6 $800.00
7/1/18 Invoice7 $400.00
7/1/18 Invoice8 $200.00
----------------------------------------------------------
Bottom 1/3 of page
Pre-printed check (voided)


Hopefully, I explained this challenge clearly. I am fairly experienced in using CR, but I'm a bit stumped wrapping my head around this one. Thanks for any ideas anyone has!

 
I think you would need to use subreports, one in each of four group header sections. In each subreport, insert a running total {#cnt} that counts each record. In the first two subs, suppress the detail section with a formula: {#cnt}>5 and in the second two, use {#cnt}<5. Size the group header sections so that only two fit on a page, with the page footer sized for the check.

It is unclear to me how you allow for the group footer if each page is divided into thirds. Perhaps you have a third group header on each page, and on page one you have allow it reserve space, while you show the total in the group footer on page 2.

I’m guessing that you might have situations where you exceed 10 invoices, and therefore might require more than two pages, which makes it more complex. Let me know if that’s the case.

I didn’t test this (famous last words), but I think it should work.

-LB
 
PS. You would also have to conditionally suppress the group header sections using a formula. Set the page numbers to reset on change of group first. Then conditionally suppress GH_a and GH_b with pagenumber>1 and GH_c and GH_d with pagenumber=1.

-LB
 
LB,
Thanks a ton for the ideas. I'll continue working on this and see what kinds of results I can produce. Much appreciated!

SC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top