Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping by date ranges

Status
Not open for further replies.

Ajb2528

Technical User
Feb 22, 2002
270
GB
Hi all!!

I have to write a report which shows a list of tasks that need to be grouped using the following:-

not overdue, less than 1 day, 1 day - 7 days, 7 days - 28 days and 28 days +

The returned data (from a SQL Server view) contains a field called DateDue (smalldatetime), this field would be used to determine the above.

I also need to include a pie chart depicting the above as percentages of the total records returned.

Can anyone help on this - PLEASE!!!

Regards,

Alan
 
you can group by a formula.

then you can make a formula with the values that you need and then group by it.


example

if database.client_name="jack" or database.client_name="jill" then "1"
else "2"

with this i can make two groups that doesnt exist in the database

to the group 1 belongs the records that match with some criteria (jack and jill)
the group 2 have the rest of the records.



another example

datepart("ww",database.table_date)


with this i can group by weeks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top