Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step online tutorials.

4.06 Tutorial 4-1. Selecting Records

Tutorial 4-1. Selecting Records

Let’s put what we learned about selecting records to use. In this tutorial, we set a filter on two fields: Country and Last Year’s Sales. For Country, we want to select a specific set of countries to print (Canada, England, and USA). For the Last Years Sales field, we only want to see records with a sales amount over $25,000.

  1. Open the Crystal Reports sample report Group.rpt. This report demonstrates grouping data on the Country and Customer Name fields. It shows the previous year’s sales by customer and their percentage of the total sales.
  2. Save the report as Select Expert Tutorial.rpt.
  3. Click the menu items Report > Select Expert.
  4. The Choose Field dialog box opens for you to select the field to filter on. Select the Customer.Country field.
  5. The Select Expert dialog box opens with the Customer.Country tab shown. For the comparison type, select Is One Of from the dropdown list.
  6. In the second dropdown list, select each of the following values: Canada, England and USA. This selects all records that are from one of those three countries.
  7. Create a second filter field by clicking on the tab and select the field Customer.Last Year’s Sales. Click the Ok button to go back to the Select Expert dialog box.
  8. For this field, we want all sales that are greater than $25,000. For the condition criteria, select Is Greater Than or Equal To. In the second dropdown list type in $25,000.
  9. To make sure you’ve entered both conditions properly, click on the Show Formula button in the bottom right hand corner. Compare your formula to the following:

{Customer.Country} in ["USA", "England", "Canada"] and {Customer.Last Year's Sales} >= $25000.00

  1. Make any necessary corrections to your formula if there is a mistake.
  2. Preview the report and it should look like the following. Notice that each sales amount is greater than $25,000.