Grouping by Dates

Stimulsoft Reports.NET discussion
Post Reply
Sandy Pham
Posts: 62
Joined: Mon Dec 11, 2006 1:43 pm
Location: U.S.A.

Grouping by Dates

Post by Sandy Pham »

I was wondering if there is any way to group by a DateTime field, but only use the date portion of the field. Can I use a function in the report group header so that I group by days? I would also like to be able to group by month or week.

Thanks!

Sandy Pham
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Grouping by Dates

Post by Edward »

Yes, it is possible.

Please use the following expression:

{MyDataSource.MyDataColumn.ToString("yyyy")}

Also the following project also could be useful, this report makes grouping by the week within fixed period. It can be open in the 'Demo' example application.

Thank you.
Attachments
68.GroupingByWeek.mrt
(22.3 KiB) Downloaded 470 times
Post Reply