How to monitor the Pivot Table data.

R

roger.camargo

I want to be able to know wich Fields are in the Filter, Row an Column
Fields, and also the TOTALS.
Everytime that the user adds or remove a field or total I want to have
an snapshot of the fields on the pivot table and if it's possible if
they are expanded, and also the Totals.
Why? Well with the design of the cube there are some Totals that only
have sense when, for example, the Time dimension is used, if I monitor
the Fields and Totals, when that Total is inserted I want to warn the
user that it needs to use the Time dimension on the Row or Column
axis.
What I've seen I can use the Query event, along with a Timer (But I
don''t know how, it isn't explained how). On OWC9 there was a
QueryComplete event that many used it for tasks similars to what I
want to do, expecially with formatting, but wasn't on OWC10 and OWC11.
Ah, this could also help me to properly format the Totals to change
the Alignment (Cuz the UseProviderFormatting change it to
LeftAlignment), when a new Total is added then change its alignment..
Any ideas and snippets of code would help me.
Thanks in advence.
 
R

roger.camargo

I've tried to monitor ViewChange and DataChange events.

Using DataChange events i could see this EventReasons:

plDataReasonRemoveTotal
plDataReasonInsertTotal
plDataReasonInsertFieldSet
plDataReasonRemoveFieldSet

With this I can know when a Total or a Field is being inserted.

with this sequence of EventReasons

plDataReasonAllIncludeExcludeChange
plDataReasonIncludedMembersChange
plDataReasonExcludedMembersChange
plDataReasonIncludedMembersChange
plDataReasonExcludedMembersChange

Are triggered when a Field is being filtered (From this it seems that
AllIncludeExceludeChange would be the key event for fltering).

But with DataChange event I can't seem to find when a Dimension is
"Expanded?" (Click on the + sign to se more details)
or the contrary (Collapsing) the Details (I want this so I can remove
programatically the field because the field is still remaining at the
PivotTable)

VIewing the Expanding and Collapsing Details are still the events that
I can't seem to know when it happens.

Using the ViewChange a lot of times the event is triggered but there
isn't a key EventReason for this.

Expanding the Details if the details were not present the
plViewReasonDataChange is the reason
Expanding the Details if the details were present there isn't a key
eventreason triggered.
Collapsing the Details there isn't a key eventreason.

On "What happened to QueryComplete Event in OWC 10?" they say
something about using a Timer to track when all the events triggered
for some actions had finished but I don't know how to do this.
I would been usefull the QueryComplete Event for the monitoring.

What I need is how to know when the Details are Expanded or Collapsed.
or how to replicate the QueryComplete event.

Thanks for any insight on this.
 
A

Alvin Bruney [MVP]

Ok, this is just a thought in the dark. You can use any suitable click event
and then do a rangefrompoint which returns a pivotdata object. Extract the
pivotdetail object from this to determine if the cursor is actually over a
detail cell. From there, you can determine the detail isexpanded property; I
haven't really thought this through so it may not work, but it's worth a
try.
 
R

roger.camargo

Thanks for the suggestion.

I've decided to left this for later, now I want to focus on the Chart,
I'm capable of using the InternalPivotTable property of the ChartSpace
to retrieve which Dimensions and Facts the Chart is using in similar
way to the PivotTable, but the Events that I'm using to monitor the
PivotTable (DataChange principally), doesn't work on the Chart (using
InternalPivotTable).

Which events should I use to monitor the changes on the Chart?
 

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