Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Analysis Server and Reporting Services (2012)
 Row wise and column wise grouping in Report builde

Author  Topic 

sureshmanian
Starting Member

26 Posts

Posted - 2013-10-31 : 09:41:13
Hi

Please look into the following table TT_Test has four fields : TR, DayDet,StaffDet, StudentDet

I want the report for the particular TR(time range), against the Particular Day, against the staff name all the student detail has to be displayed. So I did the grouping the following way

- TR (Rowwise grouping)

- DayDet (Column grouping), StaffDet (Column grouping)

- StudentDet --- in the details section

When I did this way, I found that empty rows,cells are available, hence, instead of printing the report within two to three rows it displays for six or seven rows.

I need the output this way

TR | Monday | Tuesday | Wednesday | Thursday

10:00-11:30 SS TE KV KV

MTM EA CLRSL PS

SHK NAK

12:00 - 1:30 SS TE KV KV

AGAL AAL

AA MS

----

---

--------------------------------------------------

Unfortunately, i get the output for each staff it leaves the one row and print the studentdetail after some cells

Please find the SQL query below.

--------------

create table TT_Test
(
TR nvarchar(20) null,
DayDet nvarchar(20) null,
StaffDet nvarchar(20) null,
StudentDet nvarchar(20) null);

Insert into TT_Test
select '10:00-11:30','Monday','SS','MTM'

select '10:00-11:30','Monday','SS','SHK'
union
select '10:00-11:30','Monday','TE','EA'
union
select '10:00-11:30','Monday','TE','NAK'
union
select '10:00-11:30','Tuesday','KV','CLRSRL'
union
select '10:00-11:30','Wednesday','KV','PS'
union
select '10:00-11:30','Thursday','TE','PI'
union
select '12:00-1:30','Monday','SS','AGAL'
union
select '12:00-1:30','Monday','SS','AA'
union
select '12:00-1:30','Monday','TE','AAL'
union
select '12:00-1:30','Monday','TE','MS'
union
select '12:00-1:30','Tuesday','KV','LRB++'
union
select '12:00-1:30','Wednesday','KV','RBMSPP'
union
select '12:00-1:30','Thursday','TE','PPMPP'

--

Thanks for your help

--------------------------------------------------------------------------------

SSM
   

- Advertisement -