TSM uses the industry standard Microsoft Visual FoxPro tables to store its data. As such, you can use any program that is capable of reading this file format to access the data.
WARNING – Changing any TSM data via an external program can lead to data corruption or TSM program problems unless you are experienced in dealing with Visual FoxPro database tables and its effects on the TSM program.
We recommend that you always backup your TSM data to guard against possible corruption.
You can use popular programs such as Microsoft Access and Excel to extract and view TSM data.
An alternate way to report on TSM information is to use Microsoft Excel’s import facilities using Microsoft Query to selectively import the required data from one or a number of TSM tables into Excel.
Microsoft Query, a standard component of the Microsoft Office suite, is a program for bringing data from external sources into other Microsoft Office programs — in particular, Microsoft Excel. By using Query to retrieve data from TSM, you don't have to retype the data you want to analyse in Excel. You can also update your Excel reports and summaries automatically from the original source database whenever the database is updated with new information. In most cases, you can import data by using the Import Data of Microsoft Excel as described in Excel documentation. Use Query or another program only if you need to perform specialized query tasks such as the following:
You retrieve data from TSM tables by creating a query, which is a question you ask about the TSM data stored in TSM tables. For example, you might want to extract all maintenance contracts due for renewal, or the job card sales figures for a specific product by region. You can retrieve a part of the data by selecting only the data for the product and region you want to analyse and omitting the data you don't need. With Query, you can select the columns of data that you want and bring only that data into Excel. Updating your worksheet in one operation After you have TSM data in an Excel workbook, whenever your TSM database changes, you can refresh the data to update your analysis — without having to recreate your summary reports and charts. For example, you can create a monthly sales summary and refresh it every month when the new sales figures come in.
A data source is a stored set of connection rules that allows Microsoft Excel and Microsoft Query to connect to your TSM database tables. When you use Query to set up a data source, you give the data source a name, and then supply the name and location of the TSM data files and the type of database. The information also includes the name of an ODBC driver, which is a program that makes connections to a specific type of database. TSM uses the Visual FoxPro driver. How Query uses data sources After you set up a Visual FoxPro data source for your TSM database, you can use it whenever you want to create a query to select and retrieve data from TSM — without having to retype all of the connection rules information. Query uses the data source to connect to the external TSM database and show you what data is available. After you create your query and return the data to Excel, Query retrieves the data and provides the Excel workbook with both the query and data source information so you can reconnect to TSM when you want to refresh the data. A data source is the means through which Query and Excel connect to a specific database and retrieve data. You can use Query to set up ODBC data sources to retrieve data. In Query, you can use the Query Wizard to create a simple query (A means of finding all the records stored in a data source that fit a set of criteria you name. Queries can contain operators, quotation marks, wildcard characters, and parentheses to help focus your search), or you can use advanced criteria in Query to create a more complex query. You can access Query from Excel, or you can create a query from within the PivotTable and PivotChart Wizard. Using Query to retrieve data Bringing external data into Excel with Query takes three steps: First you set up a data source to connect to your TSM database, then you use the Query Wizard to select the TSM data you want, and finally you return return the TSM data to Excel where you can format it, summarize it, and create reports from it. Installing Query Microsoft Query, including the Query Wizard, is an optional feature for Excel. Under most circumstances, you are prompted to install Query when you point to Import External Data (Get external Data on Excel 2000 and below) on the Data menu and click New Database Query. Install ODBC drivers A Visual FoxPro ODBC driver (Open Database Connectivity (ODBC) driver: A program file used to connect to a particular database.) is required to retrieve data from TSM using Query. When you install Query, you automatically install a set of ODBC drivers. If the Visual FoxPro driver is not automatically installed when you install ODBC then you will need to download and install the Visual FoxPro driver from the Microsoft Web Site separately.
Use the Query Wizard for most queries The Query Wizard, which is part of Microsoft Query, is designed for users who are new to creating queries. The wizard makes it easy to select and bring together data from different tables and fields in your database. After you select the data, you can also use the wizard to filter and sort the results of your query. You can use the Query Wizard either to create a complete query or to start a query that you make further changes to directly in Query. Work directly in Query for other types of queries If you are familiar with creating queries or you want to create a more complex query, you can work directly in Query. You can use Query to view and change queries you start creating in the Query Wizard, or you can create new queries without using the wizard. Use Query directly when you want to create queries that do the following:
After you create a query in either the Query Wizard or Microsoft Query, you can pass the data to a Microsoft Excel worksheet. The data becomes an external data range or a PivotTable report that you can format, analyse, and refresh. Formatting and analysing the data In Excel, you can use familiar tools such as the Chart Wizard or automatic subtotals to present and summarize the data. You can format the data, and your formatting is retained when you refresh the external data from the TSM database. If you add columns of formulas to the external data range, the formulas can be copied automatically to any new rows that are added to the range when you refresh the data. You can use your own column labels instead of the field names, and add row numbers automatically. For information about controlling the formatting and layout of an external data range, see Excel Help. Reusing and sharing queries In both the Query Wizard and Query, you can save a .dqy query file that you can modify, reuse, and share. Excel can open .dqy files directly, which allows you or other users to create additional external data ranges from the same query. If you want to share an Excel summary or report that is based on external data, you can give other users a workbook that contains an external data range, or you can create a report template. A report template lets you save the summary or report without saving the external data so that the file is smaller. The external data is retrieved when a user opens the report template. For information about creating report templates, see Excel Help. Refreshing external data When you refresh external data, you run the query to retrieve any new or changed data that matches your specifications. You can refresh a query in both Query and Excel. Excel provides several options for refreshing queries, including refreshing the data whenever you open the workbook and automatically refreshing it at timed intervals. You can continue to work in Excel while data is being refreshed, and you can also check the status while it's being refreshed. For information about refreshing external data in Excel, see Excel Help.
Once Microsoft Query is installed and your Visual FoxPro ODBC data source is configures, you are ready to create a new database query to import TSM information into Excel.
If you want to add this query to the list of queries that are available when you choose a query to run, click Save Query. If you want to use Microsoft Query to make further changes to your query, click the “View data or edit query in Microsoft Query” option, and then click Finish.
Often, you will want to retrieve data from more than one TSM table at once. For example, you might want to extract a list of all maintenance contracts that are due for renewal next month and include the customer address / contact details. The following exercise assumes that Microsoft Query is installed and your Visual FoxPro drivers are correctly configured.
associated customer details will be returned to Microsoft query. Press the Return Data button to return the results to your Excel Spreadsheet.