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 |  
                                    | TabAllemanStarting Member
 
 
                                        8 Posts | 
                                            
                                            |  Posted - 2009-02-26 : 12:16:05 
 |  
                                            | I am trying to use a parameter as a date in a report.  The parameter contains today's date, "02/26/2009".  The parameter is named "@ReportDate".I am trying to use it in my MDX query to get the day before yesterday.  I've tried every variation of 			[Time Dimension].[Date].&[@ReportDate].PREVMEMBER.PREVMEMBER I can think of, but nothing works.  The above example, for instance, results in the error, "The @ReportDate string cannot be converted to the date type".What is the correct way to use SSRS parameters in this manner?-Tab Alleman |  |  
                                    | CodyStarting Member
 
 
                                    24 Posts | 
                                        
                                          |  Posted - 2009-02-27 : 02:49:38 
 |  
                                          | Parameters!ReportDate.Value ? |  
                                          |  |  |  
                                    | visakh16Very Important crosS Applying yaK Herder
 
 
                                    52326 Posts | 
                                        
                                          |  Posted - 2009-03-02 : 13:02:34 
 |  
                                          | you need to use STRTOMEMBER or STRTOSET functions for these and parameter value should be passed as suggested above (Parameters!ReportDate.Value) |  
                                          |  |  |  
                                    | TabAllemanStarting Member
 
 
                                    8 Posts | 
                                        
                                          |  Posted - 2009-03-10 : 17:03:04 
 |  
                                          | Got it working.   The trick was to do this in my query:STRTOMEMBER(@ReportDate).PREVMEMBERAnd in my Dataset editor, go to the Parameters tab and define the @ReportDate parameter as this:="[Time Dimension].[Date].[" & Parameters!ReportDate.Value & "]"-Tab Alleman |  
                                          |  |  |  
                                |  |  |  |