Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Grouping features in report table, BIDS 2005 Expand / Collapse
Author
Message
Posted Tuesday, May 6, 2014 8:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 1, 2014 1:22 PM
Points: 2, Visits: 10
Hello, sorry for the extreme noob question, but here goes....

I am doing a simple Labor Cost Analysis in the table below. Heres where I am getting tripped up:

My SQL is good, I'm bringing in records for the hours worked for each employee and the amount the labor costs (as you can see in the attached image). I have this report configured to group by the store the hours are charged to and then sum the hours and dollars (you can see the group symbol on the image). This is all working and the report data has been validated.

Now that this is working, it was been requested that the hours/dollars be grouped out by store but also separated by unique department. For instance, the payroll department wants to see all the hours/dollar labor charged to the store, but separate records/lines of summed hours/dollars per department if the labor is not all charged to the same department for each store. How can I group so that it is still grouped by store (like is currently configured) but return separate lines of data for unique departments if they exist (and still group by/sum total hours/dollars for the unique departments).

I know this is reports 101, thanks for your consideration!


  Post Attachments 
Capture.JPG (6 views, 36.04 KB)
Post #1567983
Posted Tuesday, May 6, 2014 10:31 AM This worked for the OP Answer marked as solution


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:53 PM
Points: 10,277, Visits: 13,257
You can add a second group on Department within the Store group so your report would look something like this:

Store|sum of hours|sum of dollars
Department|sum of hours|sum of dollars

Or you could put the store summary in a group footer instead of the header.




Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #1568078
Posted Tuesday, May 6, 2014 11:17 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 1, 2014 1:22 PM
Points: 2, Visits: 10
That was totally it, thank you!

I play the bass, too Jack. Rock on!
Post #1568105
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse