Share via


Create the XML Framework

The following shows the XML framework required for the report. Note that the values of the Data Source and Initial Catalog attributes are not specified in the connection string. These values are obtained from the Administration database at report run time.

Insert the SQL query from Step 1 between the CommandText tags.

For more information about the XML structure, see Analysis/Reporting XML Structures.

Step 2

XMLString = 
'<xml xmlns:x=''urn:schemas-microsoft-com:office:excel''>
<x:PivotTable>
<x:OWCVersion>10.0.0.2621</x:OWCVersion>
<x:DisplayScreenTips/>
<x:MaxHeight>5000</x:MaxHeight>
<x:NoAllowDetails/>
<x:DisplayFieldList/>
<x:CacheDetails/>
<x:ConnectionString>Provider=SQLOLEDB;Integrated Security='SSPI';Initial Catalog=;Data Source=</x:ConnectionString>
<x:CommandText>SQL Query</x:CommandText>
<x:DataAxisEmpty/>
<x:PivotView>
<x:Label>
<x:Caption></x:Caption>
<x:NotVisible/>
</x:Label>
</x:PivotView>
</x:PivotTable>
</xml>'

Copyright © 2005 Microsoft Corporation.
All rights reserved.