Avatar of nsehmi
nsehmiFlag for United States of America

asked on 

Grouping Issue in Reporting Services

I have a report that needs to be grouped by Department Name. I created a group and Grouped it by DeptName. However, as it is to show all the details per group...it shows that but doesnt make the group distinct.. Here is an example

THIS IS NOW!:


Group 2
              Name  Num blah blah
Group 2
              Name Num Blah Blah
Group 3
              Name Num Blah Blah


Its suppose to SHOW:


Group 2
              Name  Num blah blah
              Name  Num blah blah
Group 3
              Name  Num blah blah

I tried putting the Name Num details group to group on DeptName ( Group 2) and its still doing it. The name field has a code that makes sure it has a distinct name per group.. which might be interefering.. here is the code

Function IsEqual(name1, name2)
 if(name1 = name2)
  return ""
Else
 return  name2
end If
End Function  

=Code.IsEqual(Previous(Fields!LastName.Value & ", " & Fields!FirstName.Value),Fields!LastName.Value & ", " & Fields!FirstName.Value)


I hope that isnt interfering with making a distinct group. Let me know what i am doing wrong as i think its a easy fix and i just am braindead right now. Thanks

Microsoft SQL ServerDB Reporting Tools

Avatar of undefined
Last Comment
nsehmi
Avatar of Zberteoc
Zberteoc
Flag of Canada image

It is possible that the distinct Group 2 iterations is caused by a difference in the actual group's name, like an extra space or something:

Group 2
Group  2

Otherwise the grouping should work.
Avatar of nsehmi
nsehmi
Flag of United States of America image

ASKER

The issue is that it shows it as

Dept 1
          Name          xxxx
                             xxxx
                             xxxx
                             Total for Emp
Dept1
          Name          xxxx
                             xxxx
                             xxxx
                             Total for Emp

I am trying to make it like this:

Dept1
          Name          xxxx
                             xxxx
                             xxxx
                             Total for Emp
          Name          xxxx
                             xxxx
                             xxxx
                             Total for Emp    
                             Total for Department:

However I am unable to do it. I been trying to tweek it forever but am unsuccessful. My deadline is tomorrow for this and its really frustrating. Right now Dept1 is a different group, Name and info is in the details section and the Total for emp is the footer of the DEPT1 Group. PLEASE HELP!
   
Avatar of Zberteoc
Zberteoc
Flag of Canada image

Exactly the problem I mentioned if you just didn't misstyped the example you poted. You have two distinct departments there one Dept 1 (with space) and one with Dept1. So somewhere in the data itself you may have an extra space that makes the department names distinct. If you correct the data in your table then the report should show corrrectly.

Avatar of nsehmi
nsehmi
Flag of United States of America image

ASKER

Oh i put that as an example.

The name is =Code.IsEqual(Previous(Fields!DeptName.Value),Fields!DeptName.Value)

the code is

Function IsEqual(name1, name2)
 if(name1 = name2)
  return ""
Else
 return  name2
end If
End Function  

It just doesnt show the next name as a repeat

instead of

123 Emp 1
123 Emp 2
123 Emp 3

It shows

123 Emp1
       Emp 2
       Emp 3

There is no name issue at all.
Avatar of Zberteoc
Zberteoc
Flag of Canada image

Now I am really confused as your last 2 posts contradict themselves.
ASKER CERTIFIED SOLUTION
Avatar of nsehmi
nsehmi
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo