RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: XML
Expertise: Advanced
Feb 21, 2007

Using the ElementPath Capability in SQL Reporting Service 2005

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:

            <ElementPath IgnoreNamespaces="True">GetSampleDataSetResponse
                 {} /GetSampleDataSetResult/diffgram {}/Results {}/Table1{ @rowOrder, testID,
In the above code, @rowOrder is the attribute of Table1 and testID, testName, and TestDescription are elements of Table 1.

Jayadev D
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date