Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
CRW_REF.PDF
Скачиваний:
5
Добавлен:
13.02.2015
Размер:
13.99 Mб
Скачать

HANDS-ON (Record and Group Selection)

How to set up record selection using the Select Expert

When you work with the Select Expert, you select the field you want to apply selection conditions to and then you specify the conditions.

You can begin your work in the Select Expert in one of two ways:

Highlight the field in your report on which you want to base record selection and then click the SELECT EXPERT button on the standard toolbar. The program opens the Select Expert, ready for you to set the conditions on the highlighted field.

Without highlighting a report field, click the SELECT EXPERT button on the standard toolbar. The Choose Field dialog box appears with indexed fields identified with colored arrowheads. Select the field you want to base your selection on (preferably an indexed field, see Indexed tables, Page 518) and click OK. The Select Expert appears. See Selection performance tips, Page 260, and search for Choose Field dialog box in Seagate Crystal Reports online Help.

2 If you want to base your record selection on more than one field, click the New Tab and choose your next field from the Choose Field dialog box when it appears.

3 Use the drop-down boxes to enter your selection criteria for the indicated field.

Record and Group Selection

263

" Click OK when you are finished.

A selection formula will be generated based on your specifications which will limit the report to the records you indicated.

NOTE: To view or edit the selection formula, click the Show Formula button. The Select Expert expands to show the formula. If

you want to use the tools in the Formula Editor to modify the formula, click the Formula Editor button. The formula will appear

in the Formula Editor.

How to set up group selection using the Select Expert

When you work with the Select Expert, you select the summary field you want to apply selection conditions to and then you specify the conditions.

You can begin your work in the Select Expert in one of two ways:

In your report, highlight the summary field on which you want to base group selection and then click the SELECT EXPERT button on the standard toolbar. The program opens the Select Expert, ready for you to set the conditions on the highlighted group field.

Without highlighting a group field in the report, click the SELECT EXPERT button on the standard toolbar. The Choose Field dialog box appears. Select the group field you want to base your selection on and click OK. The Select Expert appears.

NOTE: Summary fields identify the location of the summary value, the field that triggers a grouping when its value changes, the kind of summary, and the field being summarized, and they look similar to this in the Choose Field dialog box:

Group Footer #1: Customer.Region

Sum of Last Year’s Sales

264

Seagate Crystal Reports User’s Guide

2 If you want to base your group selection on more than one field, click the New Tab and choose your next field from the Choose Field dialog box when it appears.

3 Use the drop-down boxes to enter your selection criteria for the indicated field.

If you have not already previewed the report or refreshed the data, there will not be any data saved with the report. Without the data, the program can not calculate group values, thus no values appear when you click the arrow in the right dropdown box. In this situation, you will have to type in the values you want. If you want real values to work with, you will need to preview your report first. This will calculate the actual summary values for you to work with.

"When you are finished, click OK in the Select Expert to return to your report.

How to create a record or group selection formula

NOTE: In order to create a selection formula, you need to have some understanding of the formula language and the use of the Formula Editors. For a thorough discussion of those tools, see

Formulas 101, Page 321, and Advanced Formulas, Page 345.

Choose the EDIT SELECTION FORMULA command from the Report menu. A submenu appears.

Record and Group Selection

265

Choose Record if you want to create a record selection formula. The Record Selection Formula Editor will appear.

Choose Group if you want to create a group selection formula. The Group Selection Formula Editor will appear.

Enter your selection formula in the Formula text box as you would any other formula. Since this is a selection formula, however, the formula must be Boolean (return either a True or False value).

! Click OK when finished.

"If the Formula Editor reports errors, debug the formula as necessary and click OK again. See How to debug a formula, Page 370.

Now, when the program runs the report it will include only those records or groups of records that you specify. See How to set record selection using parameter fields, Page 396.

How to use record/group selection templates

Select the template you want to use. You can do this in one of two ways:

Review the list in Record selection formula templates, Page 256, and write down the formula of interest.

Find the Record/Group Selection Templates topic in Seagate Crystal Reports online Help and copy the formula of interest to the Clipboard.

Choose the EDIT SELECTION FORMULA command from the

Report menu. A submenu appears.

266

Seagate Crystal Reports User’s Guide

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]