Why does SSRS ignore data from specific columns returned by the web method?

I am using the XML data source function in Reporting Services 2005, but have some problems with missing data. If there is no value for the first column in the row, it seems that the whole column is ignored by SSRS!

The web method request is very simple:

<Query>
   <Method Name="GetIssues" 
Namespace="http://www.mycompany.com/App/">
   </Method>
   <SoapAction>http://www.mycompany.com/App/GetIssues</SoapAction>
   <ElementPath IgnoreNamespaces="true">*</ElementPath>
</Query>

Equally, the answer is very simple:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <GetIssuesResponse xmlns="http://www.mycompany.com/App/">
      <GetIssuesResult>
        <Issue>
          <Title>ABC</Title>
          <RaisedBy />
          <Action>Do something</Action>
        </Issue>
        <Issue>
          <Title>ABC</Title>
          <RaisedBy>Jeff Smith</RaisedBy>
          <Action>Do something</Action>
        </Issue>
      </GetIssuesResult>
    </GetIssuesResponse>
  </soap:Body>
</soap:Envelope>

In this example, the RaisedBy column will be completely empty. If the "Problems" are reversed, so RaisedBy matters first, there are no problems. Any ideas?

+3
source share
2 answers

In the query itself, try explicitly defining your columns, rather than letting SSRS define them for you.

In other words, where do you have:

<ElementPath IgnoreNamespaces="true">*</ElementPath>

* :

<ElementPath IgnoreNamespaces="true">GetIssues/GetIssuesItemsResult/listitems/data/row{@Title,@RaisedBy,@Action}</ElementPath>

, XPath .

+7

NULL XML? ? SSRS.

XML , (ISNULL SQL Server).

0

Source: https://habr.com/ru/post/1699365/


All Articles