Reporting services 应为MDX表达式。指定了一个空表达式

Reporting services 应为MDX表达式。指定了一个空表达式,reporting-services,mdx,Reporting Services,Mdx,当我试图在ssrs查询生成器中构建mdx查询时,我收到了这条消息。有什么想法吗???? 错误: 应为MDX表达式。指定了一个空表达式。(Microsoft SQL Server 2008 R2分析服务)这是我的MDX with member [Measures].[Motor: The Car]

当我试图在ssrs查询生成器中构建mdx查询时,我收到了这条消息。有什么想法吗???? 错误: 应为MDX表达式。指定了一个空表达式。(Microsoft SQL Server 2008 R2分析服务)这是我的MDX

    with                                                                                        
member [Measures].[Motor: The Car]                                                                                        
as                                                                                          
( [Web Page].[Web Site Structure].[Motor Insurance].[TheCar], [Measures].[Visit Count])                                                                                     
member [Measures].[Motor: YourPolicy]                                                                                 
as                                                                                           
( [Web Page].[Web Site Structure].[Motor Insurance].[YourPolicy], [Measures].[Visit Count])                                                                                     

member [Measures].[Motor:Proposer]                                                                            
as                                                                                            
( [Web Page].[Web Site Structure].[Motor Insurance].[Proposer], [Measures].[Visit Count])                                                                                      

member [Measures].[Home:About You]                            
as        
( [Web Page].[Web Site Structure].[House Insurance].[AboutYou], [Measures].[Visit Count])    
member [Measures].[Motor:About You]            
as         
( [Web Page].[Web Site Structure].[Motor Insurance].[AboutYou], [Measures].[Visit Count])
member [Measures].[Motor:PricesPage]             
as           
( [Web Page].[Web Site Structure].[Motor Insurance].[ViewPrices], [Measures].[Visit Count])        

member [Measures].[Home:PricesPage]                   
as           
( [Web Page].[Web Site Structure].[House Insurance].[ViewPrices], [Measures].[Visit Count]) 
member [measures].[Motor:ViewAllPrices]            
as                   
( [Web Page].[Web Site Structure].[Product].&[2].[Motor:AllViewPrices], [Measures].[Visit Count]) 

member [measures].[Home:ViewAllPrices]                  
as
( [Web Page].[Web Site Structure].[House Insurance].[Home:AllViewPrices], [Measures].[Visit Count])              
member [measures].[Home:YourCover]               
as            
( [Web Page].[Web Site Structure].[House Insurance].[YourCover], [Measures].[Visit Count])
member [measures].[Home:PolicyHolder]                     
as                     
( [Web Page].[Web Site Structure].[House Insurance].[PolicyHolder], [Measures].[Visit Count])
member [measures].[Home:Property]                      
as                        
( [Web Page].[Web Site Structure].[House Insurance].[Property], [Measures].[Visit Count])

 SELECT NON EMPTY { [Measures].[Motor:PricePanel],             
 [Measures].[Motor:PricePanel->Compare],               
 [Measures].[Motor:PricePanel->MorePanel],              
 [Measures].[Home:PricePanel->MorePanel],                
 [Measures].[MorePanel->BO+Phone],              
 [Measures].[Motor:AY->PricesPage],              
 [Measures].[PercentOfVisitsByBrowser],                
  [Measures].[Proposer->PricesPage],            
  [Measures].[Proposer->TheCar],              
   [Measures].[TheCar->YourPolicy],                  
    [Measures].[PolicyHolder->Property],
     [Measures].[YourCover->PricesPage],             
     [Measures].[Property->YourCover],               
      [Measures].[YourPolicy->PricesPage],               
       [Measures].[BO+Phone],                   
        [Measures].[Compare],                   
        [Measures].[AY->Proposer],                   
        [Measures].[Motor:PricePanel->BO+Phone],              
        [Measures].[AY->PolicyHolder],                 
        [Measures].[Home:PricePanel->BO+Phone],         
        [Measures].[Home:PricePanel->Compare],           
        [Measures].[Home:PricePanel],                 
        [Measures].[Home:AY->PricesPage],                 
        [Measures].[MorePanel],                    
        [Measures].[Motor:About You]                 
,[Measures].[Motor:Proposer]                  
,[Measures].[Motor: The Car]                 
,[Measures].[Motor: YourPolicy]                 
,[Measures].[Motor:PricesPage]                 
,[measures].[Motor:ViewAllPrices]                
,[Measures].[Home:About You]                        
,[measures].[Home:PolicyHolder]                  
,[measures].[Home:Property]                    
,[measures].[Home:YourCover]                           
,[Measures].[Home:PricesPage]                      
,[measures].[Home:ViewAllPrices]                   
,[Measures].[BO+Phone] } ON COLUMNS,                     
        NON EMPTY { ([Timeline].[Financial Date].[Visit Date].ALLMEMBERS * 
        [Product].[Products By Category].[Product Category].ALLMEMBERS ) }       
         DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS         
         FROM ( SELECT ( STRTOSET(@ProductProductsByCategory, CONSTRAINED) ) ON COLUMNS          
         FROM [Visits]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS 

语法看起来不错,所以我猜@ProductsByCategory就是问题所在

    with                                                                                        
member [Measures].[Motor: The Car]                                                                                        
as                                                                                          
( [Web Page].[Web Site Structure].[Motor Insurance].[TheCar], [Measures].[Visit Count])                                                                                     
member [Measures].[Motor: YourPolicy]                                                                                 
as                                                                                           
( [Web Page].[Web Site Structure].[Motor Insurance].[YourPolicy], [Measures].[Visit Count])                                                                                     

member [Measures].[Motor:Proposer]                                                                            
as                                                                                            
( [Web Page].[Web Site Structure].[Motor Insurance].[Proposer], [Measures].[Visit Count])                                                                                      

member [Measures].[Home:About You]                            
as        
( [Web Page].[Web Site Structure].[House Insurance].[AboutYou], [Measures].[Visit Count])    
member [Measures].[Motor:About You]            
as         
( [Web Page].[Web Site Structure].[Motor Insurance].[AboutYou], [Measures].[Visit Count])
member [Measures].[Motor:PricesPage]             
as           
( [Web Page].[Web Site Structure].[Motor Insurance].[ViewPrices], [Measures].[Visit Count])        

member [Measures].[Home:PricesPage]                   
as           
( [Web Page].[Web Site Structure].[House Insurance].[ViewPrices], [Measures].[Visit Count]) 
member [measures].[Motor:ViewAllPrices]            
as                   
( [Web Page].[Web Site Structure].[Product].&[2].[Motor:AllViewPrices], [Measures].[Visit Count]) 

member [measures].[Home:ViewAllPrices]                  
as
( [Web Page].[Web Site Structure].[House Insurance].[Home:AllViewPrices], [Measures].[Visit Count])              
member [measures].[Home:YourCover]               
as            
( [Web Page].[Web Site Structure].[House Insurance].[YourCover], [Measures].[Visit Count])
member [measures].[Home:PolicyHolder]                     
as                     
( [Web Page].[Web Site Structure].[House Insurance].[PolicyHolder], [Measures].[Visit Count])
member [measures].[Home:Property]                      
as                        
( [Web Page].[Web Site Structure].[House Insurance].[Property], [Measures].[Visit Count])

 SELECT NON EMPTY { [Measures].[Motor:PricePanel],             
 [Measures].[Motor:PricePanel->Compare],               
 [Measures].[Motor:PricePanel->MorePanel],              
 [Measures].[Home:PricePanel->MorePanel],                
 [Measures].[MorePanel->BO+Phone],              
 [Measures].[Motor:AY->PricesPage],              
 [Measures].[PercentOfVisitsByBrowser],                
  [Measures].[Proposer->PricesPage],            
  [Measures].[Proposer->TheCar],              
   [Measures].[TheCar->YourPolicy],                  
    [Measures].[PolicyHolder->Property],
     [Measures].[YourCover->PricesPage],             
     [Measures].[Property->YourCover],               
      [Measures].[YourPolicy->PricesPage],               
       [Measures].[BO+Phone],                   
        [Measures].[Compare],                   
        [Measures].[AY->Proposer],                   
        [Measures].[Motor:PricePanel->BO+Phone],              
        [Measures].[AY->PolicyHolder],                 
        [Measures].[Home:PricePanel->BO+Phone],         
        [Measures].[Home:PricePanel->Compare],           
        [Measures].[Home:PricePanel],                 
        [Measures].[Home:AY->PricesPage],                 
        [Measures].[MorePanel],                    
        [Measures].[Motor:About You]                 
,[Measures].[Motor:Proposer]                  
,[Measures].[Motor: The Car]                 
,[Measures].[Motor: YourPolicy]                 
,[Measures].[Motor:PricesPage]                 
,[measures].[Motor:ViewAllPrices]                
,[Measures].[Home:About You]                        
,[measures].[Home:PolicyHolder]                  
,[measures].[Home:Property]                    
,[measures].[Home:YourCover]                           
,[Measures].[Home:PricesPage]                      
,[measures].[Home:ViewAllPrices]                   
,[Measures].[BO+Phone] } ON COLUMNS,                     
        NON EMPTY { ([Timeline].[Financial Date].[Visit Date].ALLMEMBERS * 
        [Product].[Products By Category].[Product Category].ALLMEMBERS ) }       
         DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS         
         FROM ( SELECT ( STRTOSET(@ProductProductsByCategory, CONSTRAINED) ) ON COLUMNS          
         FROM [Visits]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS 
传递给此参数的字符串需要采用集合的形式,因为您使用的是stroset函数。 我通常删除“constrated”参数,因为它强制您列出一组由扭曲的大括号{}括起的元组 如果删除该参数,则可以使用返回集合的MDX表达式,而不是显式指定集合

    with                                                                                        
member [Measures].[Motor: The Car]                                                                                        
as                                                                                          
( [Web Page].[Web Site Structure].[Motor Insurance].[TheCar], [Measures].[Visit Count])                                                                                     
member [Measures].[Motor: YourPolicy]                                                                                 
as                                                                                           
( [Web Page].[Web Site Structure].[Motor Insurance].[YourPolicy], [Measures].[Visit Count])                                                                                     

member [Measures].[Motor:Proposer]                                                                            
as                                                                                            
( [Web Page].[Web Site Structure].[Motor Insurance].[Proposer], [Measures].[Visit Count])                                                                                      

member [Measures].[Home:About You]                            
as        
( [Web Page].[Web Site Structure].[House Insurance].[AboutYou], [Measures].[Visit Count])    
member [Measures].[Motor:About You]            
as         
( [Web Page].[Web Site Structure].[Motor Insurance].[AboutYou], [Measures].[Visit Count])
member [Measures].[Motor:PricesPage]             
as           
( [Web Page].[Web Site Structure].[Motor Insurance].[ViewPrices], [Measures].[Visit Count])        

member [Measures].[Home:PricesPage]                   
as           
( [Web Page].[Web Site Structure].[House Insurance].[ViewPrices], [Measures].[Visit Count]) 
member [measures].[Motor:ViewAllPrices]            
as                   
( [Web Page].[Web Site Structure].[Product].&[2].[Motor:AllViewPrices], [Measures].[Visit Count]) 

member [measures].[Home:ViewAllPrices]                  
as
( [Web Page].[Web Site Structure].[House Insurance].[Home:AllViewPrices], [Measures].[Visit Count])              
member [measures].[Home:YourCover]               
as            
( [Web Page].[Web Site Structure].[House Insurance].[YourCover], [Measures].[Visit Count])
member [measures].[Home:PolicyHolder]                     
as                     
( [Web Page].[Web Site Structure].[House Insurance].[PolicyHolder], [Measures].[Visit Count])
member [measures].[Home:Property]                      
as                        
( [Web Page].[Web Site Structure].[House Insurance].[Property], [Measures].[Visit Count])

 SELECT NON EMPTY { [Measures].[Motor:PricePanel],             
 [Measures].[Motor:PricePanel->Compare],               
 [Measures].[Motor:PricePanel->MorePanel],              
 [Measures].[Home:PricePanel->MorePanel],                
 [Measures].[MorePanel->BO+Phone],              
 [Measures].[Motor:AY->PricesPage],              
 [Measures].[PercentOfVisitsByBrowser],                
  [Measures].[Proposer->PricesPage],            
  [Measures].[Proposer->TheCar],              
   [Measures].[TheCar->YourPolicy],                  
    [Measures].[PolicyHolder->Property],
     [Measures].[YourCover->PricesPage],             
     [Measures].[Property->YourCover],               
      [Measures].[YourPolicy->PricesPage],               
       [Measures].[BO+Phone],                   
        [Measures].[Compare],                   
        [Measures].[AY->Proposer],                   
        [Measures].[Motor:PricePanel->BO+Phone],              
        [Measures].[AY->PolicyHolder],                 
        [Measures].[Home:PricePanel->BO+Phone],         
        [Measures].[Home:PricePanel->Compare],           
        [Measures].[Home:PricePanel],                 
        [Measures].[Home:AY->PricesPage],                 
        [Measures].[MorePanel],                    
        [Measures].[Motor:About You]                 
,[Measures].[Motor:Proposer]                  
,[Measures].[Motor: The Car]                 
,[Measures].[Motor: YourPolicy]                 
,[Measures].[Motor:PricesPage]                 
,[measures].[Motor:ViewAllPrices]                
,[Measures].[Home:About You]                        
,[measures].[Home:PolicyHolder]                  
,[measures].[Home:Property]                    
,[measures].[Home:YourCover]                           
,[Measures].[Home:PricesPage]                      
,[measures].[Home:ViewAllPrices]                   
,[Measures].[BO+Phone] } ON COLUMNS,                     
        NON EMPTY { ([Timeline].[Financial Date].[Visit Date].ALLMEMBERS * 
        [Product].[Products By Category].[Product Category].ALLMEMBERS ) }       
         DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS         
         FROM ( SELECT ( STRTOSET(@ProductProductsByCategory, CONSTRAINED) ) ON COLUMNS          
         FROM [Visits]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS 

在参数的默认值中,还需要指定一个集合。如果它只是一个成员,则使用StrToMember函数

是的,您需要指定一个MDX表达式来选择POV/过滤器。为什么不向我们展示一些关于查询的信息(最好是代码),这样我们就可以告诉您一些您还不知道的信息呢。。。。。。。。。。。
    with                                                                                        
member [Measures].[Motor: The Car]                                                                                        
as                                                                                          
( [Web Page].[Web Site Structure].[Motor Insurance].[TheCar], [Measures].[Visit Count])                                                                                     
member [Measures].[Motor: YourPolicy]                                                                                 
as                                                                                           
( [Web Page].[Web Site Structure].[Motor Insurance].[YourPolicy], [Measures].[Visit Count])                                                                                     

member [Measures].[Motor:Proposer]                                                                            
as                                                                                            
( [Web Page].[Web Site Structure].[Motor Insurance].[Proposer], [Measures].[Visit Count])                                                                                      

member [Measures].[Home:About You]                            
as        
( [Web Page].[Web Site Structure].[House Insurance].[AboutYou], [Measures].[Visit Count])    
member [Measures].[Motor:About You]            
as         
( [Web Page].[Web Site Structure].[Motor Insurance].[AboutYou], [Measures].[Visit Count])
member [Measures].[Motor:PricesPage]             
as           
( [Web Page].[Web Site Structure].[Motor Insurance].[ViewPrices], [Measures].[Visit Count])        

member [Measures].[Home:PricesPage]                   
as           
( [Web Page].[Web Site Structure].[House Insurance].[ViewPrices], [Measures].[Visit Count]) 
member [measures].[Motor:ViewAllPrices]            
as                   
( [Web Page].[Web Site Structure].[Product].&[2].[Motor:AllViewPrices], [Measures].[Visit Count]) 

member [measures].[Home:ViewAllPrices]                  
as
( [Web Page].[Web Site Structure].[House Insurance].[Home:AllViewPrices], [Measures].[Visit Count])              
member [measures].[Home:YourCover]               
as            
( [Web Page].[Web Site Structure].[House Insurance].[YourCover], [Measures].[Visit Count])
member [measures].[Home:PolicyHolder]                     
as                     
( [Web Page].[Web Site Structure].[House Insurance].[PolicyHolder], [Measures].[Visit Count])
member [measures].[Home:Property]                      
as                        
( [Web Page].[Web Site Structure].[House Insurance].[Property], [Measures].[Visit Count])

 SELECT NON EMPTY { [Measures].[Motor:PricePanel],             
 [Measures].[Motor:PricePanel->Compare],               
 [Measures].[Motor:PricePanel->MorePanel],              
 [Measures].[Home:PricePanel->MorePanel],                
 [Measures].[MorePanel->BO+Phone],              
 [Measures].[Motor:AY->PricesPage],              
 [Measures].[PercentOfVisitsByBrowser],                
  [Measures].[Proposer->PricesPage],            
  [Measures].[Proposer->TheCar],              
   [Measures].[TheCar->YourPolicy],                  
    [Measures].[PolicyHolder->Property],
     [Measures].[YourCover->PricesPage],             
     [Measures].[Property->YourCover],               
      [Measures].[YourPolicy->PricesPage],               
       [Measures].[BO+Phone],                   
        [Measures].[Compare],                   
        [Measures].[AY->Proposer],                   
        [Measures].[Motor:PricePanel->BO+Phone],              
        [Measures].[AY->PolicyHolder],                 
        [Measures].[Home:PricePanel->BO+Phone],         
        [Measures].[Home:PricePanel->Compare],           
        [Measures].[Home:PricePanel],                 
        [Measures].[Home:AY->PricesPage],                 
        [Measures].[MorePanel],                    
        [Measures].[Motor:About You]                 
,[Measures].[Motor:Proposer]                  
,[Measures].[Motor: The Car]                 
,[Measures].[Motor: YourPolicy]                 
,[Measures].[Motor:PricesPage]                 
,[measures].[Motor:ViewAllPrices]                
,[Measures].[Home:About You]                        
,[measures].[Home:PolicyHolder]                  
,[measures].[Home:Property]                    
,[measures].[Home:YourCover]                           
,[Measures].[Home:PricesPage]                      
,[measures].[Home:ViewAllPrices]                   
,[Measures].[BO+Phone] } ON COLUMNS,                     
        NON EMPTY { ([Timeline].[Financial Date].[Visit Date].ALLMEMBERS * 
        [Product].[Products By Category].[Product Category].ALLMEMBERS ) }       
         DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS         
         FROM ( SELECT ( STRTOSET(@ProductProductsByCategory, CONSTRAINED) ) ON COLUMNS          
         FROM [Visits]) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS