how to group in report (1 Viewer)

mujib ur rahman

Registered User.
Local time
Today, 22:42
Joined
Mar 27, 2012
Messages
20
ho to make grouping on month? i have hostl database and want to group data on tha basis of month like mar, apr, may, etc plz help me
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:42
Joined
Feb 19, 2002
Messages
43,297
Add a field to your query to format the date into a column that you can use to group by.

Select ..., Format(YourDate, "yyyy-mm") as GroupByMonth, Format(YourDate, "mmm") As MonthName
From YourTable;

Use GroupByMonth as your sorting/grouping option. You'll need to add the field as a hidden control in the group header. Add MonthName as a visible control in the header section. If you will have multi-year data, include year in the visible month name field.
 

mujib ur rahman

Registered User.
Local time
Today, 22:42
Joined
Mar 27, 2012
Messages
20
i have check_in_date in booking table,,,,,,, so i want to group booking information on month wise ,,,, mean the booking which are done in april are separate group and may are separate etc
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:42
Joined
Feb 19, 2002
Messages
43,297
That's what the query does. Feel free to adjust my suggested query to modify the table and column names to suit your situation.
 

Users who are viewing this thread

Top Bottom