Page 1 of 2

how to group by one column, sort by another column

Posted: Thu Jun 03, 2010 12:37 am
by xiaoliyuan
Hi all,
In the report, there is a datasource for a list of products. I have added a groupheader to group them by product ID, but I don't want to sort them by productID , instead I want to sort the products by product description. Anyone can help me with this?
Thanks
Ben

how to group by one column, sort by another column

Posted: Thu Jun 03, 2010 1:23 am
by Jan
Hello Ben,

Please set SortDirection property of GrooupHeaderBand to None. After then add required sorting to DataBand.

Thank you.

how to group by one column, sort by another column

Posted: Thu Jun 03, 2010 4:49 pm
by xiaoliyuan
great, thanks. It works:biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin:

how to group by one column, sort by another column

Posted: Mon Jun 20, 2011 1:00 am
by hana
I have the same problam but I dont understood your help
what do you meen " add required sorting to DataBand"?

how to group by one column, sort by another column

Posted: Mon Jun 20, 2011 6:54 am
by Ivan
Hello,
hana wrote:I have the same problam but I dont understood your help
what do you meen " add required sorting to DataBand"?
Please set the Sort property of the databand to: SortBy=product_description_field, Ascending.

Thank you.

how to group by one column, sort by another column

Posted: Tue Jun 21, 2011 1:45 am
by hana
I want to group by ProductID
but to view the groups sorting by ProductName

I didnt mean that I wanted to sort the data of every group but to sort the groups

how to group by one column, sort by another column

Posted: Tue Jun 21, 2011 10:20 am
by Andrew
Hello,

Does the only ProductName correspond to each ProductID?
Then you can group by ProductName.

Thank you.

how to group by one column, sort by another column

Posted: Tue Jun 21, 2011 11:36 pm
by hana
hello,

"ProductName" was just example

I want to sort by column that not correspond to each ProductID

what can I do?

how to group by one column, sort by another column

Posted: Wed Jun 22, 2011 8:52 am
by Ivan
Hello,

Can you please send us a sample report template with data?

Thank you.

Re: how to group by one column, sort by another column

Posted: Thu Feb 27, 2025 12:43 pm
by wprmdev
I have the same problem. I have a dataset with the following structure:

SupplierId, SupplierName, ProductId, ProductName.

I need to group by SupplierId and sort by SupplierName.

And the DataBand sorts by ProductName.

Why not group by SupplierName? We can't guarantee that the name is unique. The ID is responsible for that.

This is a common situation. To me, it doesn't make sense to use a name or description instead of the ID.

Is there a solution for this?

I am using version: 2024.3.2