Text report driver functions

In the cases when you need a driver to manage your report, use functions from the TextReportDriver external type to control the file that contains your report data. You call most of these functions from a variable that is based on the TextReportDriver type.

You cannot call these functions until the variable exists; therefore you must create the variable using one of two functions that you call directly from the TextReportDriver. These two functions are declared as static, meaning that they exist apart from any variables that you create based on the TextReportDriver.

A second table lists the functions that you call directly from the TextReportDriver type.

Table 1. TextReportDriver functions
Function Description
reportDriver = createDriverFromTempFile() Creates a unique report driver file that holds report information.
reportDriver = createDriverForAppend(fileName) Opens the specified report driver file so that you can append report information as it is generated.

The following table lists the functions that you call from a variable based on the TextReportDriver type.

Table 2. Functions from a variable based on TextReportDriver
Function Description
closeFile() Closes the driver file that contains report information.
deleteFile() Deletes the driver file.
fileName = getFileName() Returns the name of the current driver file.
reportLine = getNextReportLine() Returns a line from the driver file.
errorMsg = popErrorMessage() Returns the most recent saved error message.
pushErrorMessage(errorMsg) Places the specified error message on a stack.

Feedback