title: SSRS 2008 How to group row data under column headings
body: <p>I know this is easy, but not if you don't know how. I'm trying to create a report in SSRS 2008 (not R2).</p>
  
  <p>I have the following data returned in my query:</p>
  
  <pre><code>dept                quadrant        inv_quadrant    title    
  
  Analgesics          High/High   High/High   Existing
  Cough &amp; Cold        High/High   High/High   Existing
  Dispensary          High/High   High/High   Existing
  First Aid &amp; Wound   High/Low    Low/Low     Movement
  Confectionary       Low/High    Low/High    Existing
  Family Planning     Low/High    Low/High    Existing
  Foot Care           Low/High    Low/Low     Movement
  Medicines S2 &amp; S3   Low/High    Low/High    Existing
  Oral Hygiene        Low/High    Low/High    Existing
  Stomach &amp; Bowel     Low/High    Low/Low     Movement
  Baby                Low/Low     Low/Low     Existing
  First Aid &amp; Wound   Low/Low     High/Low    New
  Foot Care           Low/Low     Low/High    New
  </code></pre>
  
  <p>I would like the data to be grouped by quadrant and then by title within the quadrant, like so:</p>
  
  <pre><code>High/High    Existing             Movement            New
               Analgesics
               Cough &amp; Cold
               Dispensary
  High/Low                          First Aid &amp; Wound
  Low/High     Confectionary        Foot Care
               Family Planning      Stomach &amp; Bowel
               Medicines S2 &amp; S3
               Oral Hygiene
  Low/Low      Baby                                     First Aid &amp; Wound
                                                        Foot Care
  </code></pre>
  
  <p>I can almost get it to present like this by creating a table with row group on quadrant, but then the data in the columns is presented line-by-line instead of directly below its column heading, like this:</p>
  
  <pre><code>High/High    Existing             Movement            New
               Analgesics
               Cough &amp; Cold
               Dispensary
  High/Low                          First Aid &amp; Wound
  Low/High     Confectionary        
               Family Planning      
                                    Foot Care
               Medicines S2 &amp; S3
               Oral Hygiene
                                    Stomach &amp; Bowel
  
  Low/Low      Baby
                                                        First Aid &amp; Wound
                                                        Foot Care
  </code></pre>
  
  <p>I also tried using a matrix with row group on quadrant and column group on title but it's only showing one record per quadrant(??)...</p>
  
  <p>I'm sure I need some kind of column grouping or something basic to fix this. Also the query is a fairly complex union of 4 temp tables (nasty, I didn't write it) so if I can avoid using a dense_rank as I've seen mentioned in similar cases, I'd prefer to and not mess with the query unless there's no other way.</p>
  
  <p>Thank you so much!</p>