Solved

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

Posted on 2016-09-13
6
45 Views
Last Modified: 2016-10-05
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:  
Report.JPG
This is what I am able to get from the mail merge:
Single.JPG
This is what I am looking for :
group.JPG

Thanks for your help,
0
Comment
Question by:lovettjay
  • 3
  • 2
6 Comments
 
LVL 17

Accepted Solution

by:
Pawan Kumar Khowal earned 500 total points (awarded by participants)
ID: 41797367
I think you should do all the operations in the SQL itself. that should help,
0
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
ID: 41797369
If you can share the table details , I can write the complete query for you !
0
 

Author Comment

by:lovettjay
ID: 41797944
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
0
 

Author Comment

by:lovettjay
ID: 41801635
Here is the SSRS table:

SSRS table
The Row Groups:
Row-Groups.JPG
0
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
ID: 41829523
Closing this.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now