Binding XML data to Pivot Table

N

Nikhil Dabke

I have data in form of XML. I want to bind this data to pivot table. The XML
I have is the actual data and not XML extracted thru objPivot.XMLData
property.

Any suggestions?

Thanks in Advance,
Nikhil Dabke
Merrill Lynch
 
N

Nikhil Dabke

Hi Alvin,
Thanks for the update. I already had a look at this link. What this example
does is,

It creates a server-side instance of an OWC component, make a connection,
set properties, and then use this instance to generate XML data for a
separate, client-side instance of the PivotTable component.

I tried out this approach, but the XML data generated by server side
instance is not the "actual data", but the structure of the pivot table
created on server side, the connection string, etc. In other words it has the
information about the data rather than the data itself.

Here is the snippet of the XML generated by the approach mentioned at the
link you sent -

<x:pivotTable>
<x:OWCVersion>10.0.0.6765</x:OWCVersion>
<x:NoDisplayAlerts />
<x:DisplayScreenTips />
<x:CubeProvider>msolap.2</x:CubeProvider>
<x:CacheDetails />
<x:ConnectionString>Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Working\AQTNET\northwind.mdb</x:ConnectionString>
<x:CommandText>Select * from [Product Sales for 1997]</x:CommandText>
<x:Name>Product Sales for 1997</x:Name>
<x:DataAxisEmpty />
<x:pivotField>
<x:Name>Category</x:Name>
<x:SourceName>CategoryName</x:SourceName>
<x:FilterCaption>CategoryName</x:FilterCaption>
<x:Orientation>Row</x:Orientation>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
<x:Expanded />
</x:pivotField>
<x:pivotField>
<x:Name>Product</x:Name>
<x:SourceName>ProductName</x:SourceName>
<x:FilterCaption>ProductName</x:FilterCaption>
<x:Orientation>Row</x:Orientation>
<x:position>2</x:position>
<x:EncodedType>adVarWChar</x:EncodedType>
<x:CompareOrderedMembersBy>UniqueName</x:CompareOrderedMembersBy>
<x:Expanded />
</x:pivotField>
........
........
</x:pivotTable>

Thanks,
Nikhil Dabke
Merrill Lynch


Alvin Bruney - ASP.NET MVP said:
Have a look at this link, it will give you a few ideas:
http://msdn.microsoft.com/msdnmag/issues/03/10/OLAP/default.aspx


--
Warm Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley 2006
Blog: http://msmvps.com/blogs/Alvin/
-------------------------------------------------------



Nikhil Dabke said:
I have data in form of XML. I want to bind this data to pivot table. The XML
I have is the actual data and not XML extracted thru objPivot.XMLData
property.

Any suggestions?

Thanks in Advance,
Nikhil Dabke
Merrill Lynch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top