|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Index Page FooterOn a recent NEWS group, someone asked if it's possible to print an index in the page footer. On the bottom of each page, this user wanted to print an identifier of the first and last item on the page (e.g. "Adam to Brian","Bruce to Callum", etc.). Sounds tough, doesn't it? But it was easier than you might think, with the simple use of a variable. A formula in the Page Header: WhilePrintingRecords; stringvar First:={table.field} A Formula in the Page Footer: WhilePrintingRecords; stringvar First Print the table.field in the report footer to show the final value for the page. Be aware, this technique can only be used on the page footer. The page header cannot identify the item at the bottom of the page. While we're on the topic of page footers, here's some more information that you may find quite helpful. Use two Page Footer sections for Odd and Even page footers If you look at any professionally prepared bound, double sided publication you will see the page footers are different on the odd and even pages. The Even numbered pages on the left of the binding often have the page numbers on the left, and other copyright information on the right, while the right hand, odd numbered pages have these fields the other way around. The theory is that if you are looking for a specific page number, then you can thumb along the pages and see all the page numbers on the outer edge of the document. You can achieve the same effect in your Crystal Reports by using a Page Footer a and Page Footer b section with the two layouts you want. Then conditionally suppress the sections using a formula of Remainder(PageNumber,2)=0 //To suppress if page number is even And Remainder(PageNumber,2)=1 //To suppress if page number is odd You might also want to use the section formatting option "Reserve Minimum Page Footer" to give you a little more room for data on the page. See below for some good info and tips on formatting. No sort? You can also put a range in the footer where the data aren't sorted. For example, we wanted to show the highest and lowest value of a field’s values on the page. The solution is a slight variation on the solution we used for the index in the page footer: A formula in the Page Header: (Supress)
A formula in the Details: (Supress)
A Formula in the Page Footer:
This technique can be used only on the page footer. The page header can only see the record at the top of the page. It is not aware (yet) of the other records to be printed on the page. Twofer Speaking of footers, you can use two page footer sections for odd and even page footers. If you look at any professionally prepared bound, double sided publication you will see the page footers are different on the odd and even pages. The Even numbered pages on the left of the binding often have the page numbers on the left, and other copyright information on the right, while the right hand, odd numbered pages have these fields the other way around. The theory is that if you are looking for a specific page number, then you can thumb along the pages and see all the page numbers on the outer edge of the document. You can achieve the same effect in your Crystal Reports by using a Page Footer a and Page Footer b section with the two layouts you want. Then conditionally suppress the sections using a formula of Remainder(PageNumber,2)=0 //To suppress if page number is even And Remainder(PageNumber,2)=1 //To suppress if page number is odd You might also want to use the section formatting option "Reserve Minimum Page Footer" to give you a little more room for data on the page.
This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects. |