Using DBLaunch
Overview
Launching a View in Excel
- Set the DB.File$ variable to the name of the view (including the .V00 extension)
- Set the DB.Dir$ variable to the directory where the view file is located
- Set the DB.Command$ variable to DB.ExcelView$
The following code segment shows how to launch a view in Excel:
Include "DBLaunch.inc"
DB.File$ = "FebruarySales.V00"
DB.Dir$ = "RPT"
DB.Command$ = DB.ExcelView$
Print (#,DB.Launch)
Enter "DBLaunch", DIR="UTL"
Input (#,DB.Result)
If DB.ErrCode NE 0
... display error message returned in DB.Msg$
Endif
|
Launching a Report Preview in Crystal Reports
- Set the DB.File$ variable to the name of the report (including the .RPT extension)
- Set the DB.Dir$ variable to the directory where the report file is located
- Set the DB.Command$ variable to DB.ReportView$
The following code segment shows how to launch a report preview in Crystal Reports:
Include "DBLaunch.inc"
DB.File$ = "CustomerList.RPT"
DB.Dir$ = "RPT"
DB.Command$ = DB.ReportView$
Print (#,DB.Launch)
Enter "DBLaunch", DIR="UTL"
Input (#,DB.Result)
If DB.ErrCode NE 0
... display error message returned in DB.Msg$
Endif
|
Printing a Report with Crystal Reports
- Set the DB.File$ variable to the name of the report (including the .RPT extension)
- Set the DB.Dir$ variable to the directory where the report file is located
- Set the DB.Command$ variable to DB.ReportPrint$
The following code segment shows how to print a report with Crystal Reports:
Include "DBLaunch.inc"
DB.File$ = "InventoryReport.RPT"
DB.Dir$ = "RPT"
DB.Command$ = DB.ReportPrint$
Print (#,DB.Launch)
Enter "DBLaunch", DIR="UTL"
Input (#,DB.Result)
If DB.ErrCode NE 0
... display error message returned in DB.Msg$
Endif
|
Include File