| 
                
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. 
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | mikebirdAged Yak Warrior
 
 
                                        529 Posts | 
                                            
                                            |  Posted - 2009-03-02 : 05:29:56 
 |  
                                            | When I have a matrix ruled by date, how do I group these in batches by day, week, month, etc?I've never given it thought because Crystal Reports has an option by dropdown to do this. I assume the config has to be done by SQL clause. How do I group by 24-hours, 7 days, or 30 days, or 6 months, 1 or more years at a time? |  |  
                                    | mikebirdAged Yak Warrior
 
 
                                    529 Posts | 
                                        
                                          |  Posted - 2009-03-02 : 05:35:21 
 |  
                                          | Don't actually need to set parameters - the grouping will always be weekly. But how do you do it? |  
                                          |  |  |  
                                    | mikebirdAged Yak Warrior
 
 
                                    529 Posts | 
                                        
                                          |  Posted - 2009-03-02 : 06:18:40 
 |  
                                          | What goes into the fx box in SSRS? I've tried concentrating on the entire SQL query / SP for the whole report, but from experience it's best to fetch all the columns with the right criteria, then leave levels of grouping, for charts and gauges til last with reports. |  
                                          |  |  |  
                                    | mikebirdAged Yak Warrior
 
 
                                    529 Posts | 
                                        
                                          |  Posted - 2009-03-02 : 06:28:24 
 |  
                                          | Fixed. left(date, 11) in the SP does the job by getting rid of the time. 115,763 rows down to 2,658 |  
                                          |  |  |  
                                    | visakh16Very Important crosS Applying yaK Herder
 
 
                                    52326 Posts | 
                                        
                                          |  Posted - 2009-03-02 : 12:57:57 
 |  
                                          | quote:better tou use date functions like datepart(). using string functions like left() will cause problems in sorting the date values.Originally posted by mikebird
 Fixed. left(date, 11) in the SP does the job by getting rid of the time. 115,763 rows down to 2,658
 
 |  
                                          |  |  |  
                                |  |  |  |  |  |