Problem binding PivotControl with XML data island recordset

A

Aquanut

After installing XP SP2 I've encountered problems drilling down into
the details of the PivotControl data. Using the sample html code below
clicking on anything other than the Grand Total 3 gives "The query
could not be processed: The Data provider didn't supply any further
information"

Clicking on the Grand Total 3 returns the 3 id's as expected.

Using the data island recordset property as the source for the pivot
seems to be causing the problem.

I was using the ADODB.stream to load the pivot from one of the MS
samples and that still works with SP2 but I'm unable to use it here at
work now because of the security concerns.

Using the mspersist provider and an external .xml file is not an option
as shown in HOWTO: Use an XML DataSource with the Office Chart
Component (KB 286212) because I need to stay with the embedded data
island for this application.

The following configuration works:
XP
IE 6.0.2880.1106.xpsp2
OWC 10.0.0.6619
MDAC 2.7 SP1

Doesn't work:
XP SP2
IE 6.0.2900.2180
OWC: 10.0.0.6619
MDAC 2.8 SP1

Any suggestions would be much appreciated.

TIA

Rob

-----------------------------------------
<html>
<body>
<xml id="xmlsource">
<root>
<orowitem>
<id>1108</id>
<Fullname>Mouse, Mickey</Fullname>
<Location>Disney World</Location>
</orowitem>

<orowitem>
<id>1693</id>
<Fullname>Duck, Donald</Fullname>
<Location>Disney Land</Location>
</orowitem>

<orowitem>
<id>3931</id>
<Fullname>Mouse, Minnie</Fullname>
<Location>Disney World</Location>
</orowitem>
</root>
</xml>


<object classid="clsid:5220cb21-c88d-11cf-b347-00aa00a28331"
id="object1" style="display: none" >
<param name="LPKPath" value="/owc/license.lpk">
</object>

<object id="Pivotcontrol1" style="width: 100%; height: 250px"
classid="clsid:0002E552-0000-0000-C000-000000000046">
</object>


<script language="VBScript">
'Obtain a string that represents the XML data island.
Dim oXML, sXML
Set oXML = document.body.getElementsByTagName("xml")
sXML = oXML(0).outerHTML

'Load the XML data island into an ADO recordset.
Dim oRS
Set oRS = CreateObject("ADODB.Recordset")
set oRS = xmlsource.recordset

'Bind the pivot table to the recordset

Set Pivotcontrol1.DataSource = oRS
Set objPivot = document.all.Pivotcontrol1
Set objView = objPivot.ActiveView
Set objFlds = objPivot.ActiveView.FieldSets
objView.RowAxis.InsertFieldSet(objFlds(1))
objView.ColumnAxis.InsertFieldSet(objFlds(2))
objView.DataAxis.InsertFieldSet(objFlds(0))
objview.TitleBar.Caption = "Test"
Set ptConstants = objPivot.Constants
Set totNewTotal = objView.AddTotal("Total Characters",
objView.Fieldsets(0).Fields(0), ptConstants.plFunctionCount)
objView.DataAxis.InsertTotal totNewTotal
objPivot.ActiveData.HideDetails

' display the required control options
objPivot.DisplayFieldList = 1
objPivot.AllowFiltering = 1
objPivot.DisplayExpandIndicator = 1
objPivot.DisplayToolbar = 1
objPivot.AllowDetails = 1
objPivot.AllowGrouping = 1

</script>

</body>
</html>
 

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