SOAP call with query on result (SSRS, Sharepoint)

前端 未结 4 1358
梦如初夏
梦如初夏 2020-12-21 06:20

I created a report in VS using a shared data source which is connected to a sharepoint list. In the report I created a dataset with a SOAP call to the data source so I get t

4条回答
  •  不知归路
    2020-12-21 06:47

    A post at:

    http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/1562bc7c-8348-441d-8b59-245d70c3d967/

    Suggested using this syntax for placement of the node (this example is to retrieve the item with an ID of 1):

    
      http://schemas.microsoft.com/sharepoint/soap/GetListItems
      
        
          
            {CE7A4C2E-D03A-4AF3-BCA3-BA2A0ADCADC7}
          
          
            
              
                
                  
                    
                    1
                  
                
              
            
          
        
      
      *
    
    

    However this would give me the following error:

    Failed to execute web request for the specified URL

    With the following in the details:

    Element <Query> of parameter query is missing or invalid

    From looking at the SOAP message with Microsoft Network Monitor, it looks as though the node is getting escaped to <Query> etc, which is why it fails.

    However, I was able to get this to work using the method described in Martin Kurek's response at:

    http://www.sharepointblogs.com/dwise/archive/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux.aspx

    So, I used this as my query:

    
      http://schemas.microsoft.com/sharepoint/soap/GetListItems
       
          
             
                {CE7A4C2E-D03A-4AF3-BCA3-BA2A0ADCADC7}
             
             
               
          
       
       *
    
    

    And then defined a parameter on the dataset named query, with the following value:

    1
    

    I was also able to make my query dependent on a report parameter, by setting the query dataset parameter to the following expression:

    ="" & 
    Parameters!TaskID.Value & 
    ""
    

提交回复
热议问题