I have written a crystal report with the following query:
select distinct(substr(rg_grade.letter_04,1,1)) Grade, count(substr(rg_grade.letter_04,1,1)) Count, rg_course.department_id,rg_course.grade_level
from rg_grade,rg_course,rg_student
where rg_grade.course_id=rg_course.id
and rg_grade.student_id=rg_student.id
and student_group='Active'
and rg_grade.letter_04 is not null
and rg_student.current_grade in ('5','6','7','8')
and rg_course.id not in ('ENG0840','ENG0850','SOC0850')
group by substr(rg_grade.letter_04,1,1),rg_course.department_id,
rg_course.grade_level
order by rg_course.department_id
This is giving me the information I need. What I want to do is replace "letter_04" with a variable so that I can provide that information at the time I run the report, and pull a different column from my table (could be letter_01,letter_02 ... etc.) Does anyone know how to get this done in crystal? I can do parameters in the where clause, just not sure how to get it done in my select clause. Any help is appreciated!