< sortField />
< sortField />
By default a report will be sorted on its first column. This element allows for customization of the sorting, either for the intial data presentation or as a permanent aspect of the data source. One or more sort fields may be specified for a grid panel or for a dataSource. A
sortField
that is a child of a
panel
element is part of the inital sorting which can then be modified interactively. A
sortField
that is a child element of a
dataSource
is 'sticky' and affects all queries made through that dataSource. In either case, if more than one
sortField
is used, the sorting will occur first on the first field, then on the second field, etc.
<panel type="grid">
<sortField name="fl_id" table="rm" ascending="true"/>
<sortField name="rm_id" table="rm" ascending="true"/>
...
</panel>
Enclosing Element:
This tag is a
direct child of a
<panel>
or
<dataSource>
element
.
Encloses: This tag does not enclose any child elements.
Attributes
Attribute | Description | Valid Values | Optional |
---|---|---|---|
table | Specifies which table in the data source should used to retrieve the field value for sorting the retrieved records | a valid data source table name | yes |
name | Specifies, along with the table attribute, which column should be the source of the field value or the column used for sorting the retrieved records | a valid field name in the data source table | yes |
ascending | Whether the ordering based on this field is organized from smallest to largest or vice versa |
true
or
false
, defaulting to
true
|
yes |