If you are using Office 2000 (Version 9) OWC, then you may need this
additional DLL, described in an earlier post:
Quote:
|
From: Patrice Lamarche (Patrice.Lamarche (AT) no-spam (DOT) amadeus-csi.com)
|
Subject: Re: OWC pivot component....novice....Urgent Help!
View this article only
Newsgroups: microsoft.public.sqlserver.olap
Date: 2003-03-21 05:48:02 PST
Hello,
here some indication from Lori Turner.
Applying an MDX query directly is not supported by the Office 9.0
PivotTable Component.
However, there is an unsupported DLL that ships with SQL Server 2000
that
enables to you to apply MDX to the PivotTable component:
PTable.ConnectionString = "provider=msolap;data
source=localhost;inital
catalog=Foodmart;"
PTable.DataMember = "Sales"
Dim MDXLoader As New OWCMDXLib.ApplyMDX
MDXLoader.ApplyMDX PTable, "SELECT Measures.MEMBERS ON COLUMNS, " & _
" HEAD(ORDER({[Store].[Store City].MEMBERS}, " & _
" Measures.[Sales Count], BDESC), 5) ON ROWS " & _
"From [Sales]"
OWCMDX.DLL is in the MSEQ.CAB file on the SQL Server 2000 CD. It has
only
one object with one method -- ApplyMDX. Please note that use of this
ActiveX DLL is unsupported.
Alternatively, you could use ADO to create a flattened recordset using
your
MDX query, persist the recordset to XML and then use the XML data as the
PivotTable's datasource using the MSPersist OLE DB Provider. This would
create a PivotTable with tabular, not hierarchical, data:
ptable.ConnectionString = "provider=mspersist"
ptable.CommandText = sURL
There's an example (..\Chap04\PivotTableXML.htm) for using an XML data
source with the pivot table component on the companion CD for the book
"Programming Microsoft Office 2000 Web Components" (MSPress), Author
Dave
Stearns.
Additional samples and resources for the web components can be found at
http://support.microsoft.com/support...ev/webcomp.asp
Hope this helps,
Lori Turner
Microsoft Developer Support
Best regards
Patrice .
- Deepak
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!