Problem Retreiving a Pivot Table Column Member

D

Dan Ricker

I'm not sure what you mean by "create an object"

The Code pivottable1.activedata.columnaxis.columnmember
returns and object.

In the client code if you run

Msgbox TypeName
(pivottable1.activedata.columnaxis.columnmember) the alert
will be displayed with "PivotColumnMember" as the text.

Under ColumnMember, you have .ChildMembers for accessing
the children of that object.

One general comment. For both the Row and Column, there is
a "dummy" top level "PivotMember" this is done to provide
a consistent point of entry for recursing the Row/Column
Member trees.
 
V

visakasi

Originally posted by Dan Ricker
Hi Dan,

Thanks for the response.When i run the following code

Msgbox TypeName
(pivottable1.activedata.columnaxis.columnmember)


I get the error like "Unexpected call to method or property access".



FYI.
My sample code is like this.In the client side i am creating the Pivot
table component using the Object tag.

....

....

....
...


' Clear the lists of any options that are there
For ct = (cboField.options.length - 1) To 0 Step -1
cboField.options.remove ct
Next 'ct

' Load the fields list based on what is in the view
Set pview = ptable.ActiveView

msgbox ptable.ActiveData.ColumnAxis.ColumnMember ' ***** Error

For Each Item In
ptable.ActiveData.ColumnAxis.ColumnMember.ChildMembers

MsgBox Item.Value

Next

For Each fset In pview.RowAxis.Fieldsets
For Each fld In fset.Fields
Set opt = document.createElement("OPTION")
opt.Text = fld.Caption
opt.Value = fset.UniqueName & "~" & fld.Name
cboField.options.add opt
Next 'fld
Next 'fset


In the line marked ***** , i get a Client Script error as "Unexpected
call to method or property access".

I used the same object in VB and made a reference to that.The same
code is working in VB.

But i get an error in the Client side.Where i am wrong ?


Any help is highly appreciated.Thanks!


Regards,
Kasi




I'm not sure what you mean by "create an object"

The Code pivottable1.activedata.columnaxis.columnmember
returns and object.

In the client code if you run

Msgbox TypeName
(pivottable1.activedata.columnaxis.columnmember) the alert
will be displayed with "PivotColumnMember" as the text.

Under ColumnMember, you have .ChildMembers for accessing
the children of that object.

One general comment. For both the Row and Column, there is
a "dummy" top level "PivotMember" this is done to provide
a consistent point of entry for recursing the Row/Column
Member trees.




http://dbforums.com/http://dbforums.com
.
 

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