===================================================================== Hot Tip: Printing Report Headers and Footers in Crystal Reports ===================================================================== Product: Crystal Reports Version 1.0 ===================================================================== Area: Reports Catalog: Forms, Reports and Labels ===================================================================== Crystal Reports doesn't have a separate Report Header section. There is a Page Header section, but that prints at the top of every page, not just once at the beginning of a report. Define a formula to have a text field print just once at the beginning of the report to act as a report header. Here's the steps to create a Report Header that prints "Summary Report". 1. Choose to add a Formula Field to the report. Click on the formula button on the Button Bar or select Insert|Formula Field. 2. Define the text to print using the if x then y else z function. Test the built in page number function to see if the report is on page 1, if it is print the title, if not print a blank. For example, IF PageNumber = 1 THEN "Summary Report" ELSE " " | | This is where your title goes. 3. Click on the Check button to check for errors and then Accept. 4. Locate the field in the desired location at the top of the report in the Page Header section. Format the field as desired. The text prints when the first page of the report prints, a blank prints on all subsequent pages. Printing Report Footers in Crystal Reports ------------------------------------------ Crystal Reports doesn't have a separate Report Footer section. There is a Page Footer section, but that prints at the bottom of every page, not just once at the end of a report. The section that prints once at the end of a report is the Grand Total section. The Grand Total section can be used to act as a report footer. Here's the steps to create a Report Footer that prints "The End" and the system date on the last page of the report. 1. Select a field. The field can be any data type and be located in a Detail or Group Section. 2. Select Insert|Grand Total and click on OK. 3. The Grand Total section is created with a located field. Press Del. The field is deleted from the Grand Total section, but the section remains in the report. 4. Choose to add a text field to the report. Enter "The End" as the text to print. Locate the text field in the Grand Total section. Format it as desired. 5. Select Insert|Print Date Field. Place the date field in the Grand Total section. Note that the Grand Total section prints at the end of the report, but before the Page Footer section. If defined, a Page Footer section prints after the Grand Total section. Printing the current time in a Crystal Report --------------------------------------------- Crystal Reports comes with some sample user defined functions. They are listed at the very bottom of the Function list in the formula editor under Additional Functions. One of these sample user defined functions is Now. Now is a function that prints the current system time as a text string. It has no parameters. Define a formula field as just the function name Now, locate it on the report and the current system time prints in that location. The Now function and other Additional Functions are not included in the printed documention, but are included in the Help files. Select Function Index (alpha) from Help contents and then select the desired function by name.