cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help -Section formatting, page breaks, group totals, underlayed images

Former Member
0 Kudos

Using Crystal Reports 10.

I have an invoice form that I need to print onto a "preprinted form". I have successfully underlayed the bitmap image of the preprinted form under the invoice data. However, the guidance I used (from this forum) to underlay the image says that the Page header cannot underlay the page footer. The Cvrystal form that I am basing my invoice on originally had the invoice totals located in the Page Footer. So, to get around that, I moved the invoice totals to the Group Footer Section and supressed the Page Footer. This all works well as long as the invoice has a number of detail lines that does not run beyond the physical placement of the totals area on the preprinted form. When there are more detail lines, the detail just runs to the bottom of the page and starts page 2, etc. Ultimately, the totals for the entire invioce print in the correct location on the last page of the invioce.

In a situation in which I have more line (detail) items than can fit in the fixed size area that the physical form allows, I need Crystal to stop printing detail on that page, slew to the next page and continue. It should ultimately finish as it does now with the invoice totals printing in the correct physical location on the last page of the invoice.

I have considered going back to the Page Footer carrying the totals and shortening my "underlayed" image so that the combined Page Header and Footer make up the physical lenght of the page (11 inches) but I dont think that will work because my bitmap image of the preprinted form is 8.5 X 11 and has preprinted data at both the top and bottom of the physical page.

How can I tell the Crystal that the details section is fixed in length and that there are only so many lines available per page to print detail?

Could I scan two images of the preprinted form (the top and bottom as separate images and using the top underlay it as a page header and then using the bottom image, put it in a page footer preceding the page footer that carries the data and tell it to underlay everything following?

Will appreciate your wisdom. Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Let's say you only want 20 records per page just do this...

Do a conditional new page after on the detail section using the following formula:

remainder (recordnumber, 20) = 0

Former Member
0 Kudos

Thanks for the reply, almost does what I need but a little additional information might help.

In the details, I have two detail sections detail a and detail b. Detail a carries the the item being sold ie: item code, description, Price, qty, extended price - Basically fixed length data - 1 printed line per record. Detail b carries "Comments" that the user may have entered in "invoice data entry" and their length is variable - could print on a single line or many lines, or may not exist if the user didn't enter comments.

Conceivably, the whole page of detail lines could consist of a few items being sold with long narrative comments.

Looks like the formula approach shown only counts the individual item lines printed (I set it up in detail a)But, - it doesn't account for the related comment lines. I need a "formula" that will limit the sum of the counts of detail a and detail b lines to a fixed number.

Any ideas?

Edited by: Schoen Fitzgerald on Sep 4, 2008 4:40 PM

former_member260594
Active Contributor
0 Kudos

Schoen,

This may be possible but is going to get a little complex.

If the comments field was set to a fixed width font such as Courier and the field was set to a width to accomodate a specific number of characters, such as 50, then you could count the number of lines with a formula similar to;

WhilePrintingRecords;

numbervar x;

x:= x + 1 + roundup( length ( )/50 )

You would need to create a reset formula in the Page Header.

Then conditionally set the new page after for Da and Db with;

WhilePrintingRecords;

numbervar x;

x > 20

Unfortunately this won't break a field at the 20th line, it will process the whole field on that page. However you could create a formula that chunks the comments field out at the 20th line and then use another formula to display the rest of the comments field on the next page

Answers (0)