This topic is locked

Order groups in a report

8/1/2007 6:38:46 AM
ASPRunnerPro General questions
M
mstx04 author

Hi,
Is it possible to order the groups in a report other than ASC and DESC? I would like to order the groups by a field that is inside the groups.
This would be possible if i could place a order by criteria before the first group in the order by window.
BR
Mikael

Sergey Kornilov admin 8/2/2007

Mikael,
if this field has a several different values per group ordering won't make much sense.

If this field value is the same for all records that belong to the same group just group your data by this field.

M
mstx04 author 8/3/2007

Hi,
for some reasons i wouldn't like to group by the field that is inside the group. The data is same, so it would be possible to group by that.
I know that it wouldn't make much sense to order the groups by field data, if the data wasn't the same. But in this situation the data is same in the group, so then it would be logically possible to order the groups by that, wouldn't it?
Mikael

Sergey Kornilov admin 8/3/2007

Probably you need to show an example of what you trying to build.

M
mstx04 author 8/6/2007

Here's a simple example.

This is what it looks like now. Grouped by EngineModel with Ascending sort order.
EngineModel 22A12

----------------------

Name | Power

-----------------------------

ABC | 100

DEF | 100
EngineModel 22A14

----------------------

Name | Power

-----------------------------

EFG | 300

GHI | 300
EngineModel 22B13

----------------------

Name | Power

-----------------------------

EFG | 200

GHI | 200
And this is the output I'd like to have. Grouped by EngineModel but ordered by Power descending order. Note that EngineModel isn't in asc order anymore.
EngineModel 22A14

----------------------

Name | Power

-----------------------------

EFG | 300

GHI | 300
EngineModel 22B13

----------------------

Name | Power

-----------------------------

EFG | 200

GHI | 200
EngineModel 22A12

----------------------

Name | Power

-----------------------------

ABC | 100

DEF | 100
BR
Mikael