Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analysis And Reporting With Office Web Components Mike Ammerlaan Program Manager Excel/Components Microsoft Corporation 4-302.

Similar presentations


Presentation on theme: "Analysis And Reporting With Office Web Components Mike Ammerlaan Program Manager Excel/Components Microsoft Corporation 4-302."— Presentation transcript:

1 Analysis And Reporting With Office Web Components Mike Ammerlaan Program Manager Excel/Components Microsoft Corporation 4-302

2

3 Overview Components overview Components overview Basics: Basics: Chart and PivotTable ® data binding Chart and PivotTable ® data binding Chart component basics Chart component basics PivotTable ® component basics PivotTable ® component basics Solutions: Solutions: Custom reporting using PivotTable ® Custom reporting using PivotTable ® PivotCharts PivotCharts Drill through with the PivotTable ® Drill through with the PivotTable ®

4 Food For Thought: A Timesheet Weblication

5 Web Components Overview Chart and PivotTable are COM components Chart and PivotTable are COM components Use them in: Use them in: Internet Explorer 4.01 or higher Internet Explorer 4.01 or higher Edit in FrontPage ®, Visual InterDev ®, Access Data Pages Edit in FrontPage ®, Visual InterDev ®, Access Data Pages Visual Basic ® forms, VBE forms Visual Basic ® forms, VBE forms Other COM control containers Other COM control containers UI-less UI-less

6 Connecting The Components To Data

7 Connecting To Data Passing A Data Object Passing A Data Object Build the data objects using script (e.g., an ADO Recordset) Build the data objects using script (e.g., an ADO Recordset) Pass the data objects to the control Pass the data objects to the control Setting Connection Properties Directly Setting Connection Properties Directly ConnectionString, CommandText, Data Member properties ConnectionString, CommandText, Data Member properties

8 Do It Yourself Data Objects PivotTable and Chart can connect to any Data Source Object PivotTable and Chart can connect to any Data Source Object PivotTable: PivotTable: set ptable.DataSource = dsc ptable.DataMember = name Chart: Chart: set cds = ChartSpace.ChartDataSources.Add() set cds.DataSource = dsc cds.DataMember = Name PivotTable is a DSO, thus you can bind Chart to it PivotTable is a DSO, thus you can bind Chart to it

9 Connecting Directly PivotTable natively supports CommandText and ConnectionString for connecting directly to data PivotTable natively supports CommandText and ConnectionString for connecting directly to data PivotTable connects to OLAP data via the ConnectionString and DataMember properties PivotTable connects to OLAP data via the ConnectionString and DataMember properties ptable.ConnectionString = ptable.ConnectionString = ptable.DataMember = ptable.DataMember =

10 Chart Specifics

11 Charting Terminology Chart Chart.Series ChartSpace ChartSpace Title Chart.Title Legend Chart.Series. Point

12 Chart Object Model Map ChartSpace Points(…) SeriesCollection(…) Charts(…) Trendlines(…) Axes (…) Legend PlotArea DataLabelsCollection(…) Title Border ErrorBarsCollection(…)

13 PivotTable Specifics

14 PivotTable Terminology Tool Bar Title Bar Filter Axis Row Axis Column Axis Data Axis Fieldset Field Member Total Aggregate PivotTable.Selection (PivotRange)

15 PivotTable Object Model PivotTable Column-, Row- Members(…) ActiveData ActiveView Fieldsets(…) Column-, Data-, Row-, Filter- Axis Fieldsets(…) Label FieldLabel*, Member*, Total* * = ForeColor, Font, BackColor, etc. Cells(…)

16 Solutions

17 PivotTable Reports With Predefined Views Scenario: Web page for employees to view popular report types PivotTable component in Web page, with HTML user interface PivotTable component in Web page, with HTML user interface View configuration is done with: View configuration is done with: InsertFieldSet on Axis objects InsertFieldSet on Axis objects Manipulating field objects on Axis.Fieldsets(…) Manipulating field objects on Axis.Fieldsets(…)

18 PivotCharts Scenario: Adding charts as views of a PivotTable Add a chart object to the page Add a chart object to the page Bind it to the PivotTable Bind it to the PivotTable Add a data series using SetData Add a data series using SetData Add some logic for showing an appropriate chart Add some logic for showing an appropriate chart

19 Supporting Drill Through In The PivotTable Catch DblClick Event Catch DblClick Event Use PivotTable.Selection property to determine selection Use PivotTable.Selection property to determine selection Get Row, Column and Filter Members Get Row, Column and Filter Members Build SQL WHERE clause specifying member names Build SQL WHERE clause specifying member names Set CommandText of new PivotTable Set CommandText of new PivotTable

20 More Information Office Web sites Office Web sites OfficeDev/webcomp.asp OfficeDev/webcomp.asp Search for msowcvba.chm on your drive for an API reference Search for msowcvba.chm on your drive for an API reference Programming Microsoft Office 2000 Web Components by Dave Stearns, Microsoft Press Programming Microsoft Office 2000 Web Components by Dave Stearns, Microsoft Press

21

22 Microsoft Script Editor I recommend Microsoft Script Editor for editing your scripts: I recommend Microsoft Script Editor for editing your scripts: Based on Visual Interdev, but without a lot of the unneeded complexity Based on Visual Interdev, but without a lot of the unneeded complexity Comes with Office 2000 Comes with Office 2000 To use it, make sure it is installed by using the Office setup app (it is not installed by default) To use it, make sure it is installed by using the Office setup app (it is not installed by default) Search for MSE.EXE on your machine Search for MSE.EXE on your machine

23 PivotTable Issues Visual totals Visual totals If you exclude Seattle, does WA remain the same or does it = WA – Seattle? If you exclude Seattle, does WA remain the same or does it = WA – Seattle? ActiveView.TotalAllMembers configures this ActiveView.TotalAllMembers configures this SR1 PivotTable: PivotTable.Connection property SR1 PivotTable: PivotTable.Connection property Exposes current OLAP session Exposes current OLAP session Execute CREATE MEMBER statements to create calculated members Execute CREATE MEMBER statements to create calculated members Call PivotTable.Refresh and get new ActiveData object to pick up new totals Call PivotTable.Refresh and get new ActiveData object to pick up new totals

24 Deployment No technological tie to Office 2000 No technological tie to Office 2000 Can deploy to the without also deploying Office 2000 Can deploy to the without also deploying Office 2000 However, install requires a MS Office 2000 license per desktop However, install requires a MS Office 2000 license per desktop Auto-install with Microsoft Installer Auto-install with Microsoft Installer Use the CODEBASE attribute, must be a file:\\ path (I.e. Intranet only) Use the CODEBASE attribute, must be a file:\\ path (I.e. Intranet only) CAB is 1.6 Mb CAB is 1.6 Mb Requires MDAC 2.1 for data-access Requires MDAC 2.1 for data-access

25

26 Common UI Elements AutoFit AutoFit Grows and shrinks with data Grows and shrinks with data Good for Internet Explorer, bad for forms Good for Internet Explorer, bad for forms Hide/show UI elements Hide/show UI elements Display* properties control visibility Display* properties control visibility Hide/Show Titlebar, Toolbar, FieldList, Property Toolbox, Expand indicators, Drop zones Hide/Show Titlebar, Toolbar, FieldList, Property Toolbox, Expand indicators, Drop zones Titlebar Titlebar ActiveView.Titlebar.Caption = Hello ActiveView.Titlebar.Caption = Hello


Download ppt "Analysis And Reporting With Office Web Components Mike Ammerlaan Program Manager Excel/Components Microsoft Corporation 4-302."

Similar presentations


Ads by Google