|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Page N of M–improved performanceOn our Crystal Reports, it is often useful to display Page N of M. This has been a useful special field for several versions, now.Unfortunately, using it can really slow down the development process. Crystal does "Page on Demand," which means it can show you the first page of your report while continuing to process data for subsequent pages. But if you are using "Page N of M" or "Page Count," the entire report has to be processed before you can view the first page. One solution is to omit the Page count or Page N of M until the final stage of report development. But page numbers and counts are useful on all reports. And if you need to make later changes to the report, you don’t want to delete and recreate the field. Adding and removing fields can lead to errors. A better idea is to use a formula: //PageNofM //or "Page " + totext(PageNumber,0,"","") Use the first line for production reports (and comment out the second line), and use the second line while you are designing or (redesigning) the report.
It's usually better to put the page number in the footer, rather than in the header. Why? Because that's not "headline" information. It's really tertiary, so it's best to have it at the bottom. 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.
Since you're working on the page footer, let's discuss another issue. 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.
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. |