Datasheet

6.5.3.1 To add a parameter field to your record selection formula
1.
Open the sample report Group By Intervals.rpt.
Take a moment to navigate the Group tree and see how the data is organized; notice also, in the
bottom right of the Crystal Reports window, that 269 records were returned for this report.
Note:
You'll see this number only if you have the Status Bar option selected on the View menu.
Now click the Design tab.
2.
On the View menu, click Field Explorer.
3.
In the Field Explorer, right-click Parameter Fields and select New from the shortcut menu.
The Create New Parameter dialog box appears.
4.
For the Name of the parameter, type SalesQuota.
5.
Click the Type list and select Number.
6.
In the Options area, go to the Prompt Text option and type What was last year's sales quota?
7.
In the Options area, make sure that the Allow discrete values option is True, and then click OK.
Note:
You've now created the parameter field. The rest of these procedures describe how to add the
parameter field to the record selection formula with the Select Expert.
8.
On the Report menu, click Select Expert.
The Choose Field dialog box appears.
9.
Select the Customer.Last Year's Sales field, and then click OK.
The Select Expert appears.
10.
On the Customer.Last Year's Sales tab, click the drop-down list and select is greater than.
A new drop-down list appears.
11.
Click this second list and select {?SalesQuota}.
Tip:
Click the Show Formula button to view the new record selection formula, which appears as:
{Customer.Last Year's Sales} > {?SalesQuota}. Instead of using the Select Expert, you could have
created this formula yourself in the Record Selection Formula Editor. (To see the editor, open the
Formula Workshop and select Record Selection from the Selection Formulas folder.)
12.
Click OK in the Select Expert.
You've now added your parameter field to the record selection formula. When you switch to Preview
mode, or click the Refresh button, you will be prompted for new parameter values. You can then enter
2011-05-16123
Designing Optimized Web Reports