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

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.

!In the Formula text box, type in the formula you wrote down in Step 1 or paste it from the Clipboard.

"Replace the values (fields, text, etc.) in the formula with the values you want. For example, if the example formula is:

{file.FIELD} > 99999

and you want to limit your report to records that have a value in the {orders detail.QUANTITY} field greater than 25, simply replace the existing values with the values you want so your selection formula reads:

{orders detail.QUANTITY} > 25

#Click Accept when finished to accept the selection formula and return to your report.

$Click the REFRESH button on the standard toolbar to preview the results.

How to select the top or bottom N groups

NOTE: Your report must contain a summary value to be able to perform a top N or bottom N selection.

When you select top N or bottom N groups:

choose whether you want to show the top or the bottom groups,

specify how many groups to show, and

tell the program how to deal with the records that are not in one of the selected groups.

Record and Group Selection

267

Create your report and summarize the data as desired. When you summarize the data, the program breaks the data into groups and summarizes each group.

With top N grouping, you are instructing the program to display those groups that have the highest summary values (Top N).

With bottom N grouping, you are instructing the program to display those groups that have the lowest summary values (Bottom N).

Click the TOP N EXPERT button on the supplementary toolbar. The Top N/Sort Group Expert appears with a tab for your group.

NOTE: If you have multiple group sections, the program will display a tab for each of the groups.

3 Choose Top N, Bottom N, or Sort All from this list.

4 Choose the summary that you want to base your selection on.

The summary drop-down box (on the right) is for those cases in which you have multiple summaries in a single group section. For example, in an orders report, you may sum and average the orders for each customer and display both the sum and the average in the same group section. In such a case you would select the sum or the average from this drop-down box.

268

Seagate Crystal Reports User’s Guide

#In the where N is text box, enter the number of groups you want to display. For example, if you want to display the top five groups, type “5” in this box.

$All that is left is deciding what you want to do with all those records that do not fit into the selected groups.

Toggle the include Others, with the name check box off if you want the other records excluded from the report.

Toggle the check box on and name the group if you want to lump all the other records into a single group.

% Click OK when you are finished.

Now, when the program runs the report, it will include only those groups that you specified.

Record and Group Selection

269

270

Seagate Crystal Reports User’s Guide

12 Sorting, Grouping, and

Totalling

What you will find in this chapter...

Sorting, Grouping, and Totalling Overview, Page 272

Creating custom groups, Page 277

HANDS-ON (Sorting, Grouping, and Totalling), Page 280

Sorting, Grouping, and Totalling

271

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