Link to home
Start Free TrialLog in
Avatar of lovettjay
lovettjay

asked on

SSRS to Mail Merge all details(students) on one page

Looking for some help on a mail merge process.  I would like to group all students into one page however when I run the mail merge all the students have their own page instead of being grouped by school.  

I have the report grouped by school then by group by child on exam description then group by child on the exam date.  


When I go to mail merge in word it will list out the students as individuals.  Where do I add the group by school so all students who fit that exam description & exam date  are under the school.  Where is this option at?  Is this a word mail merge,  SSRS report builder, or done in the sql query itself?


select CONVERT(varchar,ME.members_exams_examdate, 101) as exam_date,
		mem.members_firstname, mem.members_lastname, 
		me.members_exams_id, me.members_exams_score,  me.members_exams_examdate,
		ex.exams_description, 
		sc.schools_name, sc.schools_city, sc.schools_state	
from members_exams as me
join exams as ex
on me.exams_id = ex.exams_id
join schools as sc
on me.schools_id = sc.schools_id
join members as mem
on me.members_id = mem.members_id

Open in new window



This is what the report look like:  
User generated image
This is what I am able to get from the mail merge:
User generated image
This is what I am looking for :
User generated image

Thanks for your help,
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you can share the table details , I can write the complete query for you !
Avatar of lovettjay
lovettjay

ASKER

Hello Pawan,

select CONVERT(varchar,ME.members_exams_examdate, 101) as exam_date,
            mem.members_firstname, mem.members_lastname,
            me.members_exams_id, me.members_exams_score,  
            ex.exams_description,
            sc.schools_name, sc.schools_city, sc.schools_state      
from members_exams as me
left join exams as ex
on me.exams_id = ex.exams_id
join schools as sc
on me.schools_id = sc.schools_id
join members as mem
on me.members_id = mem.members_id

Thanks,

Jay
Here is the SSRS table:

User generated image
The Row Groups:
User generated image
Closing this.