Chapter 2 Installation and Startup

Software Requirements

Microsoft Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP, Windows 2003, Windows Vista or later.

Microsoft Office 97/98, Office 2000, Office XP, Office 2003 or later.

Installing PTReportCom

Run the installation program, and follow the instructions to complete PTReportCom installation. For Windows Vista, the data folder should be different from the application folder.

If you don't have Microsoft Office installed, please install it first.

If your environment is Windows 95/98 and Office 97, and you don't have VB6.0 run-time files installed, please install it. For Windows 2000, Windows XP, Windows 2003 and Office 2000 or later, you do not need to install VB6.0 run-time files because they are included in OS and Office. To install VB6.0 run-time files, just run vbrun60sp5.exe, and follow the instructions.

If you don't have ODBC Driver installed for the database you want to access, please install it.

If your OS is Windows 95/98 and you don't have Microsoft Data Access Components 2.0 (MDAC_TYP) or later installed, please install it. For Windows 2000, Windows XP and Windows 2003, you do not need to install MDAC_TYP because it is preinstalled in OS. To install MDAC_TYP, just run mdac_typ.exe, and follow the instructions.

Uninstalling PTReportCom

1. Double-click the Add/Remove Programs icon in the Windows Control Panel.

2. Do one of the following:

3. Follow the instructions on the screen to complete uninstalling the program.

PTReportCom.dll

PTReportCom.dll is an ActiveX DLL that provides PTReport object. You can write a program to work with the object. Before you can use the PTReport object, you must create a reference to the object. And you should create references to Microsoft PowerPoint and Microsoft Graph Object Library too.

To create a reference to the PTReport object

1. Do one of the following:

2. In the References dialog box, select PTReportCom.

3. You can use the Browse button to search for PTReportCom.dll.

4. In the References dialog box, Select Microsoft PowerPoint and Microsoft Graph Object Library to create their references.

5. Declare an object variable of the object's class.

Dim ptrpt As PTReport

6. Assign an object reference to the variable by using the New keyword in a Set statement.

Set ptrpt = New PTReport

PPTReport.exe

PPTReport.exe is an executable program that developed using PTReportCom.dll. It likes PTReportGen command line and can read a PTR file to create a PowerPoint report. The syntax of command is:

pptreport [-D] [-U1 user1] [-P1 pwd1] ... [-U10 user10] [-P10 pwd10] [pa1 pa2 ... pa10]

ptr file name    Specifying a PTR (.ptr) file that tells PTReportCom how to get data from data sources and how to put data into a report.
-D    Display the generated report with Microsoft PowerPoint.
-U1 user1 ...
-U10 user10
   Specify the user names. user1 is the user name of the first data source. user2 is the user name of the second data source......
-P1 pwd1 ...
-P10 pwd10
   Specify the passwords. pwd1 is the password of the first data source. pwd2 is the password of the second data source......
pa1 ... pa10    The values of the parameters defined in the PTR file. You can use parameters in SQL statements. PTReportCom will replace the names of the parameters in a SQL statement with the actual values before it executes the SQL statement. You can use no more than 10 parameters in one report.

For example, you have defined two parameters in your PTR file. The first parameter is the sales date, and the second is the category of the product. You can run PPTReport.exe as follows:

pptreport c:\WordReport\myreport.ptr 1996-05-01 "Dairy Products"