Crystal Reports
Compiled by Christopher Dairion
Not for customer distribution!
When you install Crystal Reports 9, the Excel and Access Add-In are added automatically.
A Crystal Report Wizard 9 menu option is added to the Tools menu and a button is added to the
Standard toolbar in Excel.
Create a Report From Microsoft Excel or Access
EXCEL SAMPLE: C:\Program Files\Crystal Decisions\Crystal Reports
9\Samples\En\Databases\xtreme.xls
ACCESS SAMPLE: C:\Program Files\Crystal Decisions\Crystal Reports
9\Samples\En\Databases\xtreme.mdb
1. When in Excel or Access, go to Tools � Crystal Report Wizard OR click in Excel.
2. Click Range Select and then click somewhere inside the database.
3. Click Expand the selected range automatically. The range database will appear.
4. Click Create Crystal Report . The Crystal Report 9 Wizard opens.
5. Choose the information to display on the report
Under Available Fields: select the fields to display, then click > to add the fields to the list.�Next >
6. Group the information on the report
Under Available Fields: select the fields to display, then click > to add the fields to the list. �Next >
7. Add summary information to the report
For the Group: select the group to summarize from the drop-down list, then select the function from the
drop-down list.
Select �Add Grand Totals to add a grand total in the Report Footer. �Next >
8. Sort the group based on the summarized fields
This is the Top N Sorting. Select the way to sort, the field to sort by and the sort order. � Next >
9. Select a subset of information to display on the report
From Available Fields: select the field to filter, then click > to add the field to the Filtered Fields: list.
Select the comparison
operator from the drop-down list and then add the criteria. � Next >
10. Add style to the report
Type the Report Title: and select a style � Next >
11. Choose how to save the report, then view it
Click Browse … to navigate to the drive and folder to store the file.
How would you like to view the report?
Select: �Preview (read-only), �Edit with Crystal Report Designer, or �View Later�Finish
Power Formatting with Multiple Sections
Insert an Additional Section
1. In Design view, click-and-drag the vertical separator for the section to duplicate to reveal Section a and
Section b.
2. Open the Section Expert where you can choose to
merge, move, delete or underlay.
Conditionally Format Multiple Sections
1. In Design view, insert another section.
2. Add a text object to Section b with the text to appear.
3. Open the Section Expert for Section b.
4. Click Formula Workshop X+2 after Suppress (No Drill
Down) and create the conditional statement.
WARNING!
Reports created using the Add-ins automatically use the default file options (i.e. DateTime field, formats,
fonts, and full size page preview) and cannot be changed regardless of whether or not customized
settings have been set.
oss-Tab Reports
�Pivot Table experience is beneficial for this part.
Create a Cross-Tab Report
1. Click Insert Cross-Tab .
2. Add the appropriate fields to the column, row and summarized field areas.
3. If grouping by date, select the date field and select Group Options… then select the appropriate
interval and click OK.
4. Click OK when finished.
5. Place the cross-tab in the report.
Edit and Format a Cross-Tab Report
1. Right-click the Cross-Tab in the upper left (blank) corner and select Cross-Tab Expert…
2. On the Style tab, select a style.
3. On the Customize Style tab, select appropriate formatting for the sections of the cross-tab.
4. Click OK when finished.
5. To format individual cells and titles, select the individual cells and format using the formatting toolbar.
Change the Summary Operation
1. Right-click the Cross-Tab in the upper left (blank)
corner and select Cross-Tab Expert…
2. Select the appropriate summary field and click
Change Summary
3. Select a function and then click OK.
4. Click OK when finished.
Suppress the Totals
1. Right-click the Cross-Tab in the upper left (blank) corner and select Cross-Tab Expert…
2. On the Customize Style tab, select the appropriate field and then select �Suppress Subtotal.
3. If necessary, select �Suppress Column Grand Totals.
4. Click OK when finished..
Repeat Row Headers for Multi-Page CrossTabs
1. Right-click the Cross-Tab in the upper left (blank) corner and select Cross-Tab Expert…
2. On the Customize Style tab, select �Repeat Row Labels.
3. Click OK when finished.
Create a Chart of the Cross-Tab
1. In Design view, select Cross-Tab (upper left corner).
2. Insert Chart and select appropriate chart style.
Use Alias Name for Column and Row Dimensions
1. Right-click the Cross-Tab in the upper left (blank) corner and select Cross-Tab Expert…
2. On the Customize Style tab, select the appropriate field.
3. In Alias for Formula: type the alias name.
4. Click OK when finished.
5. Format the appropriate field using the Formula Workshop X+2.
EXAMPLE for changing the font color:
if Month(GridRowColumnValue (“AliasName”) in [1,2,3] then crRed
else if Month(GridRowColumnValue (“AliasName”) in [4,5,6] then crBlue
else if Month(GridRowColumnValue (“AliasName”) in [7,8,9] then crLime
else crFuchsia
6. Click OK when finished.
Use the Running Totals Feature
Create a Running Total for a List of
Numbers
1. Select Running Total Fields in Field Explorer and then click New .
2. Provide a Running Total Name:
3. Select the appropriate field under Available Tables and Fields and then add > it to the Summary
section.
4. Select the Type of Summary from the drop-down list.
5. Select how to Evaluate and when to Reset in each section.
6. Click OK when finished.
7. Insert the running total field into your report.
Create a Conditional Running Total
1. Select Running Total Fields in Field Explorer and then click New .
2. Provide a Running Total Name:
3. Select the appropriate field under Available Tables and Fields and add > it to the Summary section.
4. Select the Type of Summary from the drop-down list.
5. In the Evaluate section, select �Use a Formula and then click Formula Workshop X+2.
6. Enter the conditional statement, save and close to return to the Create a Running Total dialog box.
7. Select when to Reset.
8. Click OK when finished.
Prompting with Parameters
Create a Parameter Field
1. Select Parameter Fields in Field Explorer and then click New .
2. Enter the Name, Prompting Text, and select the Value type.
3. Select if you want to Allow multiple values, then select if the values are to be discrete or a range.
4. To set a default entry, click Set default values .
a. Select the table for the Browse Table: field and the appropriate field with the parameters for the
Browse Field: field.
b. Select or enter the value to add: select the default value and then add > it to the Default Values list.
OPTIONAL: If you are using a date/time field, you may select Range Limited Field and provide a
beginning and ending date
for the range. This will not allow selections outside the range limit.
c. Click OK to return to the Create Parameter Field dialog box.
5. Click OK when finished.
6. To apply the parameter to the report, click Select Expert .
7. Select the field the parameter is based on to filter by and then click OK.
8. Select the is equal to comparison operator from the dropdown list.
9. Select the new parameter {?ParameterName}in the criteria dropdown list and then click OK.
Create a Pick List
1. From the Create Parameter Field dialog box, click Set default values .
2. Browse Table: select the table to use Browse Field: select the appropriate field that contains the
parameters.
3. Select or enter the value to add: select all values and then click > to add then to the Default Values
list.This will only allow up to 250 values. For more, import a pick list.
4. Click OK to return to the Create Parameter Field dialog box.
5. Click OK when finished.
Import a Pick List
1. First, create a text file with all values needed for the pick list.
a. Create new blank report with the table that contains your values for the pick list.
b. Add the field with the values for the pick list in the Detail section and preview.
c. Export as a text file.
d. Open the text file in Notepad and delete the space at the beginning of each line, then save and close.
2. From the Create Parameter Field dialog box, click Set default values .
3. Click Import pick list and select the text file containing the values, then click OK .
4. Click OK when finished.
Add a Parameter Field to a Text Object
In Design view, insert a text object and then drag the parameter field into the text object.
Use a Parameter to Conditionally Display a Message
1. Open the Section Expert for the section and click Formula Workshop X+2 for the appropriate formatting
option.
2. Use the appropriate parameter when creating the conditional statement.
3. Save and close the formula.
4. Click OK when finished.
Use an Edit Mask for a Parameter
1. From the Create Parameter Field dialog box, click Set default values .
2. Enter the appropriate characters for the Edit Mask: field.
3. Enter the appropriate characters for the Select or enter the value to add: field.
4. Click OK to return to the Create Parameter Field dialog box.
5. Click OK when finished.
Masking Characters Used in an Edit Mask for a Parameter
A Allows an alphanumeric character and requires the entry of a character.
a Allows an alphanumeric character and does not require the entry of a character.
0 Allows a numeric digit and requires the entry of a character.
9 Allows a numeric digit and does not require the entry of a character.
# Allows a digit, space or +/- and does not require the entry of a character.
L Allows a letter and requires entry of a character.
? Allows a letter and does not require entry of a character.
& Allows any character or space and requires the entry of a character.
C Allows any character or space and does not require the entry of a character.
.,:;-/ Separator character. Inserting separator characters is like hard coding the formatting for the
parameter.
When the field is placed on the report, the separator character appears in the field as a character.
< Causes following character to be converted to lower case.
> Causes following character to be converted to upper case.
\ Causes the following single character to be taken as literal. Use this to add separators that are different
from the defined separator characters.
Password Allows you to create a conditional formula to specify that certain sections of the report are
visible only when certain user passwords are entered.
Use a Parameter to Define the Sort Order for a Report
1. From the Create Parameter Field dialog box, click Set default values .
2. Add appropriate fields as default values, then click OK.
3. Deselect �Allow editing of default values when there is more than one.
4. Create a Sort Formula using the Sort Parameter.
EXAMPLE
If {?Sort Parameter} = “City” then {Customer.City}
else if {?Sort Parameter} = “Region” then {Customer.Region}
else {Customer.Customer Name}
5. Save and close formula.
6. Open Sort Expert and add the Sort Formula to the Sort Fields: list, then click OK.
Use Subreporting as a Workaround Solution
Insert an Unlinked Subreport into a
Report
1. Click Insert Subreport .
2. Select �Chose a report �Browse….
3. Select the report and then click Open.
4. Click OK when finished.
5. Place the subreport in the main report.
Create a Report with a Linked Subreport
1. Click Insert Subreport .
2. Select �Chose a report �Browse….
3. Select the report and then click Open.
4. On the Link tab, select the linked field from the Select data in subreport based on field.
5. Click OK when finished.
6. Place the subreport in the main report.
Pass Data from the Main Report into a
Subreport
1. Double-click the subreport to edit.
2. Create a parameter field to hold the transferred information.
3. Save and close, then return to the main report in Design view.
4. Right-click the subreport �Change Subreport Links…
5. Create a field link from the subtotal, grand total or formula field in the main report to the parameter field
in the subreport.
6. Click OK when finished.
Create an On-Demand Subreport
1. Open the properties of the subreport.
2. On the Subreport tab, select �On-demand subreport
3. Click X+2 after On-demand subreport caption and type the caption’s text to appear.
4. Save and close the formula.
5. Click OK when finished.
6. Deselect the subreport before you preview.
7. Click the subreport caption to view.
Once a report has been added to another report as a
subreport, it maintains no link to the original report.
To create a link, go to Format � Subreport and
select �Re import when opening.
WARNING!
This suppresses and not filters records! The tree and record count still show all
Create Report Alerts
Create a Report Alert
1. Go to Report � Alerts� Create or Modify Alerts…
2. Click New in Create Alerts window.
3. Name the alert and type a message to appear.
4. Click Condition and type conditional formula.
5. Save and close formula.
6. Be sure �Enabled is select, and then click OK.
Using Report Alerts with Parameters
1. Create Threshold parameter with prompting text to enter the threshold amount.
2. Create a new alert for the threshold amount (Go to Report � Alerts �Create or Modify Alerts…).
3. Name the alert and type a message to appear.
4. Click Condition and type conditional formula to include the {?Threshold} field.
5. Save and close formula.
6. Be sure �Enabled is select, and then click OK.
Advanced Linking
Add a Table Twice to a Report and Create an
Alias
1. Open the Database Expert and add the table to be used again.
2. Select the table name (i.e. TableName_1), then click the name
again to edit. Type the table’s alias name then press [Enter].
3. On the Links tab, click Clear Links and then click Yes .
4. Create a link from the primary key of the original table to the
primary key of the alias table.
5. Click OK and then Cancel .
Change the Join Type
1. Open the Database Expert, Links tab and rightclick the link.
2. Select the option button for the correct SQL Join Type and then click OK.
3. Click OK to close then OK to refresh the data.
Creating Powerful Groups
Create a Hierarchical Group
1. Go to Report � Hierarchical Grouping Options…
2. Select the field to sort by and then select �Sort Data Hierarchically .
3. Select a field for the Parent ID: field.
4. Select a measurement for the Group Indent: field.
5. Click OK when finished.
Create a Hierarchical Group Summary
1. Insert a summary for a field and select �Sum across hierarchy before you click OK.
Customize the Group Name Field
Using a Field Name
1. Right-click Group Header section �Change Group…
2. Select �Customize Group Name Field and �Choose from Existing Field.
3. Select the appropriate field name and then click OK.
Use a Formula to Customize
the Group Name Field
1. Right-click Group Header section �Change Group…
2. Select �Customize Group Name Field
3. Select �Use a Formula as a Group Name and then click Formula Workshop X+2.
4. Type the formula, then save and close the formula.
5. Click OK when finished.
Define Specified Order Grouping
1. Create Grouping formula based on a field.
2. Insert a group based on the Grouping formula and select to group in specified order.
3. Type the group name in Named Group: and then click New.
4. Select the comparison operator and provide the parameters.
5. Click OK when finished with this group.
6. Repeat steps 3-5 until all groups are defined.
a. To list in a specific order, edit Group #1 and click the Specified Order tab.
b. Select group name and move �to top of list.
7. On the Others tab, select how all others not previously defined will be grouped.
8. Click OK when finished.
Group on a Formula Field
1. Create a Group Parameter with prompting text to ask the user to select a field to group the report by.
2. Create a Group Formula using the {?Group Parameter}.
EXAMPLE:
if{?group parameter} = “City” then {Customer.City} else {Customer.Region}
3. Insert a group based on the {@Group Formula} field.
Use Group Selection to Filter the Records in the Report
1. Go to Report � Edit Selection Formula �Group…
2. Create a formula with a condition for the Group Name.
3. Save and close the formula.
4. Save the report and refresh the data. Data is hidden, not filtered!
OR
1. Select a summary field and open the Select Expert.
2. Select a comparison operator and a parameter for comparison.
3. Click OK when finished.
4. Save the report and refresh the data.
Data is hidden, not filtered!
Using Control Structures
Use a Select Expression for Evaluation
1. Add selection criteria on the appropriate field equal to your selection.
2. Create an Evaluation formula.
EXAMPLE:
Select Sum({TableName.FeildName},{TableName.FieldID})
case is <50: “***Needs Attention***”
case is <60: “Poor”
case is <70: “Fair”
case is <80: “Good”
case is <90: “Excellent”
default: “Superior”
3. Insert the Evaluation formula into your report.
© Copyright 2026 Paperzz