Creating a Date Range Parameter


While this date parameter is useful, it's somewhat limiting. Only records that match the exact order date entered by report users displays. A better option is to create a date parameter that uses a date range. Date ranges are nice in that they allow users to select all records for a period of time that they define — be it a week, month, quarter, year, etc. Date range parameters are the most common found in reports.

Creating date ranges isn't much different from the creation of a single date parameter. In the Field Explorer, right-click on the Order Date parameter. Select Edit from the options menu. The Edit Parameter Field dialog box displays.

From this dialog box, change the following:

  • Change the prompting text to Please Enter Order Date Range:.

  • Select the Range value(s) option.

Your screen should look like Figure 11-12.

click to expand
Figure 11-12: Changing a date parameter to allow for date ranges

Once you've done this, press the OK button. A Enter Parameter Values dialog box displays, asking you to enter the range of dates that you wish the report to display. Enter 01/01/2000 to 01/01/2001, as shown in Figure 11-13, and press OK.

click to expand
Figure 11-13: Entering date range values

Your report displays, only showing records with an order date between the date specified. Figure 11-14 displays the results of your work. Save these changes to your EmplOrders.rpt file.

click to expand
Figure 11-14: A report with a date range parameter




Mastering Business Analysis with Crystal Reports 9
Mastering Business Analysis with Crystal Reports 9 (Wordware Applications Library)
ISBN: 1556222939
EAN: 2147483647
Year: 2004
Pages: 177
Authors: Chris Tull

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net