Tutorials to .com

Tutorials to .com » Asp » Database » PivotChart and PivotTable functionality expansion

PivotChart and PivotTable functionality expansion

Print View , by: iSee ,Total views: 14 ,Word Count: 1357 ,Date: Mon, 25 May 2009 Time: 11:42 PM

Wes Kim
Microsoft Corporation

April 2001

Apply to:
Microsoft ® access 2002

Abstract: how to use the incident to the expansion of Microsoft Access 2002 in PivotTable view and PivotChart view function.

Contents
Introduction
The location of the incident available
Data Source Event
Show events
Change event
Incident command
Keyboard and mouse events
Summary

Introduction
Through Microsoft ® Office Web Components, Microsoft Access developers can PivotTable ® and PivotChart ® view included in their applications. In Access 2002, the number of new events have been added to the Access 10.0 Object Library, enables developers to enhance the view of the PivotTable and PivotChart control. This paper introduces the new events and how to use them.

The syntax of these events and code examples, see the "Access Visual Basic ® to help."

The location of the incident available
Not all events are available in the PivotTable and PivotChart view. The following table provides an overview of the location of events can be used.

Events can be used in the PivotTable view can be used in PivotChart view
OnConnect, OnDisconnect whether
BeforeQuery, Query whether
AfterLayout, BeforeRender, AfterRender, AfterFinalRender No Yes
Whether DataChange
No Yes DataSetChange
Whether PivotTableChange
SelectionChange, ViewChange yes yes
CommandEnabled, CommandChecked, CommandBeforeExecute, CommandExecute yes yes
KeyDown, KeyPress, KeyUp, MouseDown, MouseMove, MouseUp, MouseWheel *, Click, DblClick yes yes


* In the keyboard and mouse events, only events MouseWheel for Access 2002 is a new event.

Data Source Event
OnConnect, OnDisconnect
OnConnect occurred in the PivotTable view to establish a connection to its data source, the incident took place in OnDisconnect the PivotTable view to their disconnected after the data source. Usually assumed that during the conversation in the PivotTable, the existence of connections to maintain. However, if the data source connection is lost, the application can be used to warn users OnDisconnect events.

BeforeQuery, Query
Query events and BeforeQuery incident occurred in the PivotTable view, respectively, the query is sent to the data source before and after. The use of these events, the application can inform the user's query is in progress, that is, the message or change the pointer to the hourglass-shaped.

Show events
AfterLayout
AfterLayout event will be the entire layout of the PivotChart view has finished the calculation, but has not yet drawn on the screen elements in the case of any occurrence. Through the capture of the incident, the application can be drawn before any graph element, the use of drawObject return parameters ChChartDraw chart object in the empty drawing canvas shape or generate text.

BeforeRender, AfterRender
BeforeRender and AfterRender incident occurred in the PivotChart view of the elements of each drawing to the screen before and after. Through the capture of these events, application-specific elements can be drawn before and after use return parameters drawObject object ChChartDraw draw the shape of the chart, or generate text. In addition, pre-drawn elements, the application can also use the return parameters chartObject object to change the location of the elements or other attributes.

AfterFinalRender
AfterFinalRender incident took place in all the elements in PivotTable view to the screen after the draw. Through the capture of the incident, the application can draw after all the chart elements, use the return parameters drawObject object ChChartDraw the top of the chart, draw the shape of a canvas or generate text.

Change event
DataChange
Change the PivotTable view in certain attributes or PivotTable views from a certain method calls, DataChange events will occur. There are many types of environment can trigger this event. Reason by calculating the parameters, the application can determine what to change and take appropriate action.

DataSetChange
DataSetChange incident took place in the PivotChart view changed after the data set. This means that as a result of inquiries, or sent to the data source is indeed a result of the basic data changes, or PivotChart view of the current data show that structural changes have taken place (for example, add a sequence). Because the cases do not provide the data sets to change the reasons for specific information, it is proposed to use other events (such as the above shows that the incident) to capture the specific changes in PivotChart view.

PivotTableChange
PivotTable view to add or remove a field, or a total field set will PivotTableChange incident occurred; Reason parameter instructions which have taken place in the above-mentioned changes. Capture this event can provide feedback to the developers of information, showing how its application to operate in PivotTable view.

SelectionChange
Once the contents of the currently selected in the PivotTable or PivotChart view, there has been a change SelectionChange incident occurred. Then, the application can be tested on what the currently selected object and change the user interface accordingly (for example, select a custom based on the current number of available commands).

ViewChange
Once in the PivotTable view or PivotChart view, there has been a change ViewChange incident occurred. The PivotTable view, Reason parameters will be directed have taken place in what type of change; capture this event will enable the application to change the current view based on user approach to the corresponding changes in the format of PivotTable view. For the PivotChart view, Reason parameter always return the same value (-1), so to capture this event a limited role.

Incident command
CommandEnabled
When the PivotTable or PivotChart view of the test command is available when the incident occurred CommandEnabled. Command parameters of the instructions which are testing the availability of a command. After the user command menu, the application can capture the event, and use dynamic Enabled parameter to enable or disable these commands.

CommandChecked
When the PivotTable or PivotChart view of a test whether the selected command, CommandChecked events occur. Command parameters of the instructions which are testing the status of a command. After the user command menu, the application can try to capture the event, and the use of dynamic parameters Checked check or uncheck these commands.

CommandBeforeExecute, CommandExecute
CommandBeforeExecute and CommandExecute incident occurred in PivotTable or PivotChart view from the implementation of a command before or after. Command parameters of the instructions which will be the implementation of the order, or order which has just been implemented. Cancel events CommandBeforeExecute parameters can be used to cancel pending orders. The use of these events, the application can prevent the implementation of certain orders, or warnings to the user the status of pending orders.

Keyboard and mouse events
KeyDown, KeyPress, KeyUp, MouseDown, MouseMove, MouseUp, MouseWheel, Click, DblClick
In addition to MouseWheel events, these keyboard and mouse events for the Access 2002 in the PivotTable and PivotChart views are new, but in general they are Access is not a new incident; "Access Visual Basic help," its usage has been introduced .

When users click the mouse or the scroll wheel when the incident occurred MouseWheel. Developers hope to use the mouse wheel to trigger custom actions, and not for the default mouse wheel behavior (such as the PivotTable view to highlight the different series), the application can capture this event.

Summary
Access 10.0 Object Library through the use of these new cases, developers are now able to process their application in the PivotTable and PivotChart view to exert more control.


ASP Database Related Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.