Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel Reports Administration Guide > Sorting Report Records > Examining a Report Sorted on a Multi-Value Field (MVF) > About the Compare Method on the Sort Data FilterThe Compare method on the sort data filter re-sorts the data rows that have been sent to the filter. A sort filter is configured primarily by overriding the filter's Compare method to specify how the rows must be sorted. Compare takes two rows as arguments and returns one of the following values:
The code you define in the Compare method defines the criterion for ordering the records. The Compare method calls the CompareKeys method (in the AcDataSorter class in the AFC) to compare two key values obtained from the same column. The CompareKeys method returns one of the following values: In the case of the Opportunities By Sales Rep report, opportunities are being ordered primarily by sales rep and secondarily by revenue. That is, within each group with the same sales rep, the opportunities are ordered by revenue. This makes it possible for the group section to provide a group break at each change in sales rep, and within each group for the opportunities to be listed from highest to lowest in revenue. The code for the Compare method on the sort data filter is as follows: Function Compare( row1 As AcDataRow, row2 As AcDataRow ) As Integer Compare = CompareKeys(aRow.ssSales_Rep, bRow.ssSales_Rep) ' Order by Revenue, descending ' May want to use the functional data here Compare = CompareKeys(Val(bRow.ssRevenue), Val(aRow.ssRevenue)) |
![]() |
![]() ![]() |
Siebel Reports Administration Guide | Copyright © 2009, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |