When you use an XML data provider as a data source in SSRS, the query text generally consists of mainly of
SOAPAction or
MethodName tags. This also allows you to add an
ElementPath tag which precisely filters the data you need to build a report.
However, this method increases your risk of loosing Fields (columns) when the data source is refreshed. To avoid this problem, add the element and attribute names, as well as their values in the ElementPath so that the fields are always recognized. This helps simplify the report building process.
Here's an example:
<Query>
<SoapAction>http://tempuri.org/GetSampleDataSet%3c/SoapAction>
<ElementPath IgnoreNamespaces="True">GetSampleDataSetResponse
{} /GetSampleDataSetResult/diffgram {}/Results {}/Table1{ @rowOrder, testID,
testName,testDescription}
</ElementPath>
</Query>
In the above code,
@rowOrder is the attribute of
Table1 and
testID, testName, and
TestDescription are elements of
Table 1.