Data Access Specialists
Crystal Reports Consulting
SSRS Consulting


Tips & Tricks

Making a Multipage Report Header Show Page Headers or Footers on Every Page
Level: Intermediate.

To make a multipage Report Header show Page Headers or Footers on every page, you must create a fake Report Header which prints in place of the real Report Header.

Use the following steps to create a fake Report Header.

1. Create a new formula called ReportHeaderGroup: @ReportHeaderGroup WhileReadingRecords;  
2. Create a Group 1 based on this formula.
3. Create a subreport and call it ReportHeader.
4. Insert the subreport into Group Header 1.
5. Copy everything from the main report's Report Header into the Report Header of the subreport, then suppress everything in the subreport except the Report Header section you want.
6. In the main report, suppress the current Report Headers, and the new Group Footer 1.

The subreport is the new Report Header and shows Page Headers and Footers for all pages. (The size of the subreport in the main report's group header determines the space available in the subreport for placing report objects. To check the space available, open the subreport after resizing it in the main report. The unshaded area will be the only area visible in the main report. Ensure you have room in the subreport to place your objects for the fake Report Header.)

Creating Parameters in Crystal Reports
Level: Intermediate.

Need to allow other users to select records without alllowing them into your report design?
Parameters are a quick and easy solution.
To insert a parameter for a contact name, which will be a string value, just perform the following steps:

1. Select Insert/Field Object from the Main Menu.
2. Click on Parameter Fields.
3. Right click and choose New.
4. Type in "Contact Name" for your parameter name field.
5. Type in "Please Enter Contact's Name" for your prompting text.
6. Choose the String from the Value type Dropdown Menu.
7. Press Okay, and you will be returned to the Field Explorer Tab.
8. To add your new parameter to your report, select it from the Field Explorer Tab and drag it into your page header.
9. Now you have created a parameter, read the next section to learn how to incorporate your paramter into the Select Expert.

Incorporating Parameters into the Select Expert in Crystal Reports
Level: Intermediate.

Once you have created a parameter field, you need to perform a few additional steps if you want the parameter to modify the report selection criteria based on the user's input.
Let's assume you created the parameter field {?Contact Name} above.
Let's also assume the table that contains this field is called "Contacts" and the field is called "Name".
You can change these based on your own data.

1. Select Report/Edit Selection Formula/Record... from the Main Menu.
2. Type in the following: {Contacts.Name}={?Contact Name}
3. Save and Close your formula editor.
4. Now press the refresh button to see your parameter working.

Setting Parameter Default Values in Crystal Reports
Level: Intermediate.

Parameters are handy, but it helps to give the user some values to select from.
In this case, we will use the table "Contacts" and the field "Name".
Follow the steps below to set your default values for the parameter field {?Contact Name}:

1. Select Insert/Field Object from the Main Menu.
2. Click on the Parameter Field {?Contact Name} in the Field Explorer.
3. Right click and choose Edit.
4. Press the Set Default Values Button.
5. Choose Contacts from the Browse Table Dropdown.
6. Choose Name from the Browse Field Dropdown.
7. You can add all values from the selected field by pressing the double right arrow (>>), or choose the values individually. You may also type in any values you would like to display.
8. Press Okay twice, and you will be returned to the Field Explorer.
9. Now refresh your report, to see the default values which you have just added to your parameter. (Note: upgrade to XI for dynamic parameters.)