| Chapter 2 Installation and Startup |
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.
Run the installation program, and follow the instructions to complete XLReportCom installation.
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.
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.
XLReportCom.dll is an ActiveX DLL that provides XLReport object. You can write a program to work with the object. Before you can use the XLReport object, you must create a reference to the object. And you should create references to Microsoft Excel Object Library too.
To create a reference to the XLReport object
1. Do one of the following:
2. In the References dialog box, select XLReportCom.
3. You can use the Browse button to search for XLReportCom.dll.
4. In the References dialog box, Select Microsoft Excel Object Library to create their references.
5. Declare an object variable of the object's class.
Dim xlrpt As XLReport
6. Assign an object reference to the variable by using the New keyword in a Set statement.
Set xlrpt = New XLReport
ExcelReport.exe is an executable program that developed using XLReportCom.dll. It likes XLReportGen command line and can read an XRF file to create an Excel report. The syntax of command is:
excelreport[-D] [-U1 user1] [-P1 pwd1] ... [-U10 user10] [-P10 pwd10] [pa1 pa2 ... pa10]
| xrf file name | Specifying an XRF (.xrf) file that tells XLReportCom how to get data from data sources and how to put data into a report. | |
| -D | Display the generated report with Microsoft Excel. | |
| -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 XRF file. You can use parameters in SQL statements. XLReportCom 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 XRF file. The first parameter is the sales date, and the second is the category of the product. You can run ExcelReport.exe as follows:
excelreport c:\excelreport\myreport.xrf 1996-05-01 "Dairy Products"