Obtain the pivottable associated with a chartspace

G

Guy

Hi,

I am trying to create a generic internal chartspace 'component' based on OWC
10 Chartspace. The idea is that I want to trigger certain processing on
chartspace (for example deserialisation, coloring, etc) based on events that
may happen to the associated pivottable (such as pivottable change,
datachange, etc).

How do I obtain the PivotTableClass instance associated with a bound
ChartSpace? The chartspace may be bound to a recordset, a datasourcecontrol,
or a pivottable.

Thank you.

Guy
 
A

Alvin Bruney [MVP]

u may use either the chPivotResultGroupAxis of the chCategorylabels
collection
or
or the chPivotResultGroupAxis of the chSeriesCollection to hook into the
pivot table bound to the chart
 
G

Guy

Hi,

I am trying to follow your pointers. My current development environment is
in VB.NET. The properties returned are of the type System.__ComObject. And
I can't CType it to the appropriate type so that I can get its events via the
WithEvents handler.

I am currently using OWC 10 version 6619.

Thanks.

Alvin Bruney said:
u may use either the chPivotResultGroupAxis of the chCategorylabels
collection
or
or the chPivotResultGroupAxis of the chSeriesCollection to hook into the
pivot table bound to the chart

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Guy said:
Hi,

I am trying to create a generic internal chartspace 'component' based on
OWC
10 Chartspace. The idea is that I want to trigger certain processing on
chartspace (for example deserialisation, coloring, etc) based on events
that
may happen to the associated pivottable (such as pivottable change,
datachange, etc).

How do I obtain the PivotTableClass instance associated with a bound
ChartSpace? The chartspace may be bound to a recordset, a
datasourcecontrol,
or a pivottable.

Thank you.

Guy
 
A

Alvin Bruney [MVP]

try this:
objChart.SeriesCollection[0].PivotObject;

This returns a pivot object
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Guy said:
Hi,

I am trying to follow your pointers. My current development environment
is
in VB.NET. The properties returned are of the type System.__ComObject.
And
I can't CType it to the appropriate type so that I can get its events via
the
WithEvents handler.

I am currently using OWC 10 version 6619.

Thanks.

Alvin Bruney said:
u may use either the chPivotResultGroupAxis of the chCategorylabels
collection
or
or the chPivotResultGroupAxis of the chSeriesCollection to hook into the
pivot table bound to the chart

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Guy said:
Hi,

I am trying to create a generic internal chartspace 'component' based
on
OWC
10 Chartspace. The idea is that I want to trigger certain processing
on
chartspace (for example deserialisation, coloring, etc) based on events
that
may happen to the associated pivottable (such as pivottable change,
datachange, etc).

How do I obtain the PivotTableClass instance associated with a bound
ChartSpace? The chartspace may be bound to a recordset, a
datasourcecontrol,
or a pivottable.

Thank you.

Guy
 
G

Guy

I have tried your code. But

objChart.SeriesCollection[0].PivotObject

returns an instance of System.__COMObject and I cannot Ctype it to become an
instance of say 'PivotColumnMember' class.

Can you show me s sample code? I have also noticed that this may be due to
differences in version of OWC.

Thanks.

Alvin Bruney said:
try this:
objChart.SeriesCollection[0].PivotObject;

This returns a pivot object
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Guy said:
Hi,

I am trying to follow your pointers. My current development environment
is
in VB.NET. The properties returned are of the type System.__ComObject.
And
I can't CType it to the appropriate type so that I can get its events via
the
WithEvents handler.

I am currently using OWC 10 version 6619.

Thanks.

Alvin Bruney said:
u may use either the chPivotResultGroupAxis of the chCategorylabels
collection
or
or the chPivotResultGroupAxis of the chSeriesCollection to hook into the
pivot table bound to the chart

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hi,

I am trying to create a generic internal chartspace 'component' based
on
OWC
10 Chartspace. The idea is that I want to trigger certain processing
on
chartspace (for example deserialisation, coloring, etc) based on events
that
may happen to the associated pivottable (such as pivottable change,
datachange, etc).

How do I obtain the PivotTableClass instance associated with a bound
ChartSpace? The chartspace may be bound to a recordset, a
datasourcecontrol,
or a pivottable.

Thank you.

Guy
 
G

Guy

OK. I have finally succeeded to CType it. Strange, the Watch window in
Debugger returns an error when I try to CType it whereas the compiled VB.Net
code works fine.

However, I now have a PivotColumnMember instance. How do I trace that to
PivotTableClass? I really need PivotTableClass because I need to use both
the properties and the events.

How do I achieve this?

Thanks.

Guy said:
I have tried your code. But

objChart.SeriesCollection[0].PivotObject

returns an instance of System.__COMObject and I cannot Ctype it to become an
instance of say 'PivotColumnMember' class.

Can you show me s sample code? I have also noticed that this may be due to
differences in version of OWC.

Thanks.

Alvin Bruney said:
try this:
objChart.SeriesCollection[0].PivotObject;

This returns a pivot object
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Guy said:
Hi,

I am trying to follow your pointers. My current development environment
is
in VB.NET. The properties returned are of the type System.__ComObject.
And
I can't CType it to the appropriate type so that I can get its events via
the
WithEvents handler.

I am currently using OWC 10 version 6619.

Thanks.

:

u may use either the chPivotResultGroupAxis of the chCategorylabels
collection
or
or the chPivotResultGroupAxis of the chSeriesCollection to hook into the
pivot table bound to the chart

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hi,

I am trying to create a generic internal chartspace 'component' based
on
OWC
10 Chartspace. The idea is that I want to trigger certain processing
on
chartspace (for example deserialisation, coloring, etc) based on events
that
may happen to the associated pivottable (such as pivottable change,
datachange, etc).

How do I obtain the PivotTableClass instance associated with a bound
ChartSpace? The chartspace may be bound to a recordset, a
datasourcecontrol,
or a pivottable.

Thank you.

Guy
 
T

Thao Moua [ms]

If your chartspace control is binding directly to an external data source
then you cannot capture pivot events. What you want is a chartspace control
bounded to a pivottable control. This way you are using the pivottable as
the channel to all your data sources.

----------------------------------------------------------------------
Thao Moua
OWC Chartspace Support

This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
----------------------------------------------------------------------
Guy said:
OK. I have finally succeeded to CType it. Strange, the Watch window in
Debugger returns an error when I try to CType it whereas the compiled VB.Net
code works fine.

However, I now have a PivotColumnMember instance. How do I trace that to
PivotTableClass? I really need PivotTableClass because I need to use both
the properties and the events.

How do I achieve this?

Thanks.

Guy said:
I have tried your code. But

objChart.SeriesCollection[0].PivotObject

returns an instance of System.__COMObject and I cannot Ctype it to become an
instance of say 'PivotColumnMember' class.

Can you show me s sample code? I have also noticed that this may be due to
differences in version of OWC.

Thanks.

Alvin Bruney said:
try this:
objChart.SeriesCollection[0].PivotObject;

This returns a pivot object
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hi,

I am trying to follow your pointers. My current development environment
is
in VB.NET. The properties returned are of the type System.__ComObject.
And
I can't CType it to the appropriate type so that I can get its events via
the
WithEvents handler.

I am currently using OWC 10 version 6619.

Thanks.

:

u may use either the chPivotResultGroupAxis of the chCategorylabels
collection
or
or the chPivotResultGroupAxis of the chSeriesCollection to hook into the
pivot table bound to the chart

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Hi,

I am trying to create a generic internal chartspace 'component' based
on
OWC
10 Chartspace. The idea is that I want to trigger certain processing
on
chartspace (for example deserialisation, coloring, etc) based on events
that
may happen to the associated pivottable (such as pivottable change,
datachange, etc).

How do I obtain the PivotTableClass instance associated with a bound
ChartSpace? The chartspace may be bound to a recordset, a
datasourcecontrol,
or a pivottable.

Thank you.

Guy
 

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