Need Help -Section formatting, page breaks, group totals, underlayed images
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.
Graham Cunningham replied
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;
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;
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