Create a PivotTable list
The specific steps for creating a PivotTable list depend on the program you are using to design your Web page. In Microsoft Access, for example, you can add data to a PivotTable list automatically. For more information, see Help for your design program. If your design program Help does not provide a procedure for creating controls such as PivotTable lists, follow these steps:
- In your design program, open or create the Web page where you want the PivotTable list to appear.
- By using the design program's procedure for adding a control to a Web page, select the PivotTable Component and designate the location and initial size of the PivotTable list on the Web page.
- Add your source data to the PivotTable list.
Your design program might provide a simpler way to add data to a PivotTable list. Use the following procedure if your design program does not provide a procedure to add the data.
Before you can add data to a PivotTable list, you might have to install an ODBC driver or data source driver (OLE DB or OLAP support software) and set up a data source to connect to the database. For more information, see Help for your design program.
- In the design window, make sure the PivotTable list is activated. For instructions, see Help for your design program.
- Click the PivotTable list, or if data has already been added to the PivotTable list, click the title bar of the PivotTable list.
- On the toolbar in the PivotTable list, click Commands and Options , and then click the Data Source tab.
- Under Get data using, do one of the following:
-
If a data source control or a data source object that implements IDataSource is available on the Web page, set Data source control to a value in the list.
Specify connection information
-
If the Web page does not have a data source control or object, or if you want to connect to different source data, enter a connection string in the Connection box, or click Edit to browse to or enter information for a data source.
Depending on the design program you are using, clicking Edit displays the Select Data Source dialog box or the Data Link Properties dialog box.
-
If the Select Data Source dialog box appears, do the following:
-
Locate the data source you want to use in the Look in box, and double-click it in the list.
-
If the data source you want to use is not available, click New Source and follow the instructions in the Data Connection Wizard to create a new connection file for your data.
-
-
If the Data Link Properties dialog box appears, enter connection information for your data source on the Connection tab. For help on options, click Help at the bottom of the dialog box.
-
- Under Use data from, do one of the following:
-
To use the data from a specific element within the database, such as an existing table or query, click Data member, table, view, or cube name, and then select the element you want from the list.
-
To use a query or command
— such as an SQL statement — to select the data, click Command text or SQL, and then type the query or command in the box. For information about the query or command syntax, see the documentation for your database.
-
-
Click Field List on the toolbar, and drag the fields to the different areas in the PivotTable list.
Note Users cannot change a PivotTable list's connection settings in the browser.
Security Note Under some circumstances, a user can view the information used to connect to an external data source. This may represent a security risk. For more information, see About making connections to external data sources more secure.