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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filling preprinted invoice forms. 1

Status
Not open for further replies.

PhilipOfOrange

Programmer
Dec 28, 2000
19
US
This is one of those situations when I must use Crystal even though it is not the most suitable tool.

The problem I don't know how to solve, is how to keep the detail band, the same height, regardless of the number of invoice items. Otherwise, I won't be able to hit the boxes in the "footer" with tax and totals.

I'm sure this wheel has been invented, so input from anyone that can point me in the right direction will be appreciated.

Using Crystal 8, Enterprise
Called from Delphi, using Crystal VCL



 
PhilipOfOrange: (any relation to WilliamOfOrange?)

The secret here is to employ multiple subsections each one of which is suppressed if there are insufficient invoice items together with blank subsections each one of which is suppressed if there are sufficient invoice items

e.g. create 5 detail subsections,
count the number of invoice items per order,
subsection a (data fields on this one) prints every time, subsection b (data fields on this one) suppress if count<2, subsection c (empty) suppress if count >1,
subsection d (data fields on this one) suppress if count<3,
subsection e (empty) suppress if count >2 etc.

This will place your footer in the same position every time! David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
You could also put your tax calculations in a page footer instead of a group footer - page footers always start in the same spot.
Of course, if you have multiple page invoices, then you will need some logic to save the tax calcs till the last page.
Malcolm
 
will this work for making one of the details sections always start in one spot?

My client wants his check in the MIDDLE of the page, always starting at the same spot.

Check stub on the top and bottom will have transaction info,
which can grow in length depending on the # of transactions to be included --

So what I need to do is : set the top and bottom detail sections so that they will ALWAYS be the same size...

Using Crystal 6.0 (not by choice!)

Any ideas are welcome.
 
or better yet - I'm doing this and trying to get the page to always be the same size...if theres more than X amt of invoice items, I want it to &quot;spill over&quot; to the next page. If there are too few - I want it to leave &quot;space&quot; where they should be so that the page is sized.

I set a counter and initialized it in the page header.
Created variables for the invoice items (where recordnumber =1, etc and put them in fixed spots in the report)

I then set the counter to kick off to page 2 when it hit X,
and this leaves my page set at the same size every time - regardless of the amount of data that I want to bring in.

email me at cryerlisa@hotmail.com if you need more info..

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top