GenerateReport
Generates a report based on the results of previous execution.
Compatibility
Available as of IDEA version 12.0
Syntax
GenerateReport (folder As String, filetype As Integer) As String
Parameters
folder
Folder where the report file should be generated.
fileType
Type of the report file. The following values are supported:
Excel2003 = 0
Excel2007 = 1
Return Value
The path of the generated report file.
Actual report file name is that of audit test executed prior to calling GenerateReport(). If the file with such name exists within the specified folder, a unique file name is generated by decorating the file name with running index suffix:
Summary Payments by Debtor.xlsx
Summary Payments by Debtor_(2).xlsx
Summary Payments by Debtor_(3).xlsx
Example
Sub Main()
Dim ac As Object
Dim atExecutor As Object
Set ac = CreateObject("SmartAnalyzer.AutomationClient")
atId = "f4d65220-77f1-5969-8943-59c7bd448460"
tblName = "Sample-Weblog"
Set atExecutor = SA.GetAtExecutor(atId, tblName)
canExecute = atExecutor.CanExecute
IF canExecute <> 0 THEN
MsgBox"Test is not ready for execution; reason: " & canExecute & ", quit"
Exit Sub
END IF
MsgBox"Test is ready for execution"
Set result = atExecutor.Execute
IF result.State <> 2 THEN
MsgBox "Error by execution; status: " & result.State
ELSE
MsgBox"About to create report"
report = atExecutor.GenerateReport("c:/Data/MyReports", 1)
MsgBox"Report created: " + report
END IF
End Sub