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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I group on a formula field?

Status
Not open for further replies.

terenceb

Programmer
Jun 10, 2003
77
US
Hi ALL,

I am pulling data from SQL tabel on a Cashe Database with Crystal 8.5.

I run a report that shows the number of No Show Appts., Cancellations Appts., Rescheduled Appts. per medical facility. run for a selected date range. example.

Site 1 No Shows Canceled Rescheduled
34 15 68
Site 2 20 3 18

What I need now is to show this same data in a cummalative report that spans the last 12 months.

For Example.

March
Site 1 No Shows Canceled Rescheduled
34 15 68
Site 2 20 3 18

February
Site 1 No Shows Canceled Rescheduled
28 8 78
Site 2 13 16 12

ect.

How do I group it on the month when my tables do not have month field? I hope I have provided enough information, if not I have more.
 
You can create a group of a date field.

Go to Insert, Group.
Choose your Date Field in the first drop down.
In the third drop down, change it to "for each month".
In the Group Options, select Customize Group Name Field.
Choose "Use a formula as a Group Name" and select the X+2 button next to it.
In the editor add the following line:

ToText({Orders.Order Date},"MMMM yyyy")

This will give you month name and year (ie. March 2004)
If you want just month then use this:

ToText({Orders.Order Date},"MMMM")

Save and Close, then close the Group Options box.
You should now have the result you are looking for.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top