|
|||||||||
|
Crystal Reports Tools: Improve Performance While Saving Time and Money |
|
Crystal Reports: Page Header TipsTip #1: Page Header section appears after a Report Header Normally in a standard column and row report we would suppress the report header section and have the report title, date and time information in the Page Header section. However, some reports such as Charts, Crosstabs and KPI subreports may need objects in the Report Header. This means the Page Header appears after the Report Header section which is often not what you want.. The solution here is to duplicate the objects in the report header so they appear to have the same report title and date information. You can then conditionally suppress the page header for the first page with the formula PageNumber=1 Just remember to repeat any changes you make to the page header section to those duplicate objects in the Report Header.
Tip #2: Where are the Page Headers in a Subreport? When you are designing a subreport you will see that they don’t have a Page Header section. They will have one or more Report Header sections. We normally suppress or delete these as they often aren’t needed in the subreport. Subreports can be "In Place" or "On Demand". An "In Place" subreport will be processed as the report processes the section with the subreport. If the subreport overflows onto a new page, then the Page Header section from the main report will be used. If you want a custom, subreport-specific heading here, assign a shared variable value in the subreport, and retrieve it in a formula in the main report. Reset the variable when the main report resumes processing. On Demand Subreports only process when the user requests them after the main report has displayed. They don’t display any page header. This also happens if you drill down into an In Place subreport. The other sections of the subreport display fine, but the page header information is no longer available. If you want the appearance of a Page Header here you need to create a top level group within your subreport that is set to "Repeat on Each Page". Use a field that has the same value for each record in the subreport, or if that isn’t available create a formula that looks like. WhileReadingRecords; "SubReport" The formula needs to be set to WhileReadingRecords because, by default, any constant formulas are calculated "BeforeReadingRecords" and these aren’t available to use for grouping.
Tip #3: Page Headers Gone Wild Astute people often disparage the use of sound bites in news commentary. But when it comes to page headers, that's the right direction to head. So to speak. You want the page header to be concise. If it contains too much information, it ceases to become a page header and functions as some sort of subreport running across the top of the page. That's a page header gone wild. In some cases, page headers can contain no useful information but still contain far too much text. For example, it may contain the file path, report author, report title, and other information that the reader doesn't need to see on every page (or, as in the case of the filepath, at all). A good practice for page headers is to make them consist of that subsection's title, the date, and the page number. For example: ACME Production Schedule, 12JUN2012, Page 2 of 4. However, it's usually better to put the page number in the footer. Why? Because that's not "headline" information. It's really tertiary, so it's best to have it at the bottom. If you have other information that is not specific to that subsection, put it in a place other than in that subsection header (or footer).
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. |