Grouping more than one field

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Grouping more than one field

Post by Fabio Pagano »

How can i group for more than one field? Eg. In a GroupBand i would like to group for "Invoice number" (Integer)and "Invoice date" (DateTime), displaying both of them in the same group. Must i create two groups, one for each field, and in the second group i must display the two fields?

Thanks.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Grouping more than one field

Post by Edward »

Yes such a way is possible. But also in the condition of the same group you may type the following expression:

Code: Select all

{ToString(Orders.OrderDate)} {Orders.EmployeeID}
In that case you may use only one group.

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Grouping more than one field

Post by Fabio Pagano »

I wanted to add that in my case one field is datetime and one is integer.

Doing a grouping:

{ToString(MyDate)} {MyIntegerCode}

gave bad performance and uncorrect grouping.

Doing
{ToString(MyDate)} {ToString(MyIntegerCode)}

everything worked fine and performance where ok.

Thanks.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Grouping more than one field

Post by Edward »

Thank you for the tip. All expressions must be cast to the type string in the group condittion.

The same result you may achieve via the following:

{ToString(MyDate) + ToString(MyIntegerCode)}

Thank you.
Post Reply