Tech2377
Programmer
- Nov 13, 2007
- 81
In my SQL query, I have a field named 'pv.visit'. It pulls a patients visit date and displays in this manner:
'2007-10-26 14:54:00.000'
I took this and added in another field that displayed this date as 'October 2007'. This was named [VisitDate](sql code below):
SQL Code
In Crystal I want to group primary on Doctor Name and then Group all the Visits in a month together and name that Group Header with the naming convention I did in SQL.
In my report, I made two Groups. In my first grouping, I group off the Doctors Name. In the second grouping, I did grouping off pv.visit, however that gave me a grouping off each date of service. This was understandable and I know it was wrong. I think I need some help trying to figure out how to group up a months worth of visits and display that.
'2007-10-26 14:54:00.000'
I took this and added in another field that displayed this date as 'October 2007'. This was named [VisitDate](sql code below):
SQL Code
Code:
DateName(Month, pv.visit) + ' ' + Convert(VarChar(4), Year(pv.visit)) AS VisitDate,
In Crystal I want to group primary on Doctor Name and then Group all the Visits in a month together and name that Group Header with the naming convention I did in SQL.
In my report, I made two Groups. In my first grouping, I group off the Doctors Name. In the second grouping, I did grouping off pv.visit, however that gave me a grouping off each date of service. This was understandable and I know it was wrong. I think I need some help trying to figure out how to group up a months worth of visits and display that.