What happened to QueryComplete Event in OWC 10?

L

Lucas Campos

Hi,
I'm moving my application that uses OWC 9 (2000) to OWC 10 (XP).
I used to use PivotTable.QueryComplete Event in order to make some custom
refresh.
Does anybody knows what happened to this event?
Does anybody knows what can I use to replace this one?

Any idea will be welcome

Thanks

LucasC
 
K

kasi

Microsoft has modified the event PivotTable.QueryComplete
to PivotTable1_Query().You may want to look at the
OWCVBA10.chm for modified events and methods.

I am also moving my application from OWC 9 to OWC 10.I
have a problem.I am using my pivot table in the web
environment.i am not able to access the
Pivottable.activedata collections.I am using this to
access the pivot table datas.Did you face this issues?If
you have any idea let me know??

Thanks and Rgds,
visu.
 
K

kasi

Sorry PivotTable1_QueryComplete event in OWC 9 is
different from PivotTable1_Query in OWC 10.The later
doesn't fire after a query is executed.

Does anybody have an idea what is the equivalent for this
event??
:-(
 
L

Lucas Campos

That's right. Query Event was part of OWC 9 but QueryComplete disappeared in
OWC 10.
Any idea?
 
D

Dan Ricker

What specific objects off of ActiveData are you having
problems with?

There was a lot of OM changes between OWC9 and OWC10.
Possibly there is a "new" way of getting the same
information. The OWCVBA10.chm file will help with this.
 
L

Lucas Campos

OK. I generate some custom graphics and with OWC 9 I handle QueryComplete in
order to Update my Graphics. I couldn't find QueryComplete or any susbtitute
in OWC 10.
I'll try handling ViewChange() and DataChange() as you said.

Thanks.
 
K

kasi

Thanks dan.

i am not able to access any objects in ActiveData.

our situation is like this.

In our pivot table we get the column member values and put
them in the drop down.Later the user selects any of these
values and filters the pivot table.

Now what i need is after the pivot table is loaded or
query is over,i need to get the column memeber values
and put them in drop down list.

To get the column member values i don't know in which
event i need to put this code.

Any help is appreciated.
 
D

Dan Ricker

If I'm understanding you correctly, you don't need to wait
for the Pivot To complete to read this information.

Something you may be running into:

The PivotData object is recreated everytime the pivot
changes (due to needed new data... not just background
color and such). Consequently any "old" PivotData object
that may have been saved in a global variable is no longer
valid. In reality, even an "old" PivotData object in the
same procedure could be made invalid by changing the pivot.

e.g.:

''' Assume Pivot is connected
Set objPD = PivotTable1.ActiveData
SetPivotRowAxisFiltering("SomeArgument")
''' at this point, objPD is "stale" and no longer valid
''' so it must be retrieved again.
Set objPD = PivotTable1.ActiveData
''' Read some of the data from the pivot
 
D

Dan Ricker

Based on what I read, I'm not convince you need events to
do what is needed.

Sub MyPageLoadCode()
Dim objColMems
Dim lCount
Dim avntColVals
''' Build The Desired PivotTable
MyBuildProcedure '''
''' Now Get the Column Members
Set objColMems =
PivotTable1.ActiveData.ColumnAxis.Member.ChildMembers
ReDim avntColVals(0 to objColMems.Count -1)
For lCount = 0 To objColMems.Count - 1
avntColVals(lCount) = objColMems(lCount).Caption
Next
''' Call the list box load function with the data
MyBuildCBOProceduer avntColVals
End Sub
 
V

visakasi

I found the solution.I put The code where i access the pivot table
data in the window onload event.

Now I had a different problem.When the user filters the pivot table ,i
again have to update the drop down list.So what i did was i put the
code in the pivot table's datachange event and got resolved.

Thanks Dan.You showed me the way....




Originally posted by Dan Ricker
Based on what I read, I'm not convince you need events to
do what is needed.

Sub MyPageLoadCode()
Dim objColMems
Dim lCount
Dim avntColVals
''' Build The Desired PivotTable
MyBuildProcedure '''
''' Now Get the Column Members
Set objColMems =

ReDim avntColVals(0 to objColMems.Count -1)
For lCount = 0 To objColMems.Count - 1
avntColVals(lCount) = objColMems(lCount).Caption

''' Call the list box load function with the data
MyBuildCBOProceduer avntColVals
 

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