CreateResultObject
Creates a result to be added to the result collection.
Compatibility
Available as of IDEA version 9.0
Syntax
CreateResultObject(databaseName as String, resultType as Integer, isVisible as Boolean, reportSequence as Integer)
Parameters
databaseName
Name of the IDEA database with extension.
resultType
Value that specifies the type of the result
... 0 = not a result
... 1 = assigned database
... 2 = intermediate result
... 4 = final result
... 8 = no registration
isVisible
Value indicating whether the result is visible or not in the Results window of the Select and Run and Results and Reporting module.
reportSequence
Number indicating the order of the results in the report.
Remarks
An error is raised if the databaseName is empty or invalid.
ExtraValues dictionary of (name, value) pairs can be used for setting some properties.
| Named properties | Description |
|---|---|
|
ShortName |
Excel sheet name, must not exceed 27 characters. |
|
Description |
Describes the current result database used in the Results and Reporting module. |
|
ReportColumns |
Specifies the column order used in the report. |
|
RowCount |
Specifies the maximum number of rows displayed in the report. |
Example
'Constants for UniqueFileName and CreateResultObject functions
Const NOT_A_RESULT As Long = 0
Const INPUT_DATABASE As Long = 1
Const INTERMEDIATE_RESULT As Long = 2
Const FINAL_RESULT As Long = 4
Const NO_REGISTRATION As Long = 8
Dim SimpleCommands As Object
Dim resultFile As Object
Sub Main
Set SimpleCommands = SmartContext.MacroCommands.SimpleCommands
...
...
'Register as final result - visible in S&R and R&R, first report entry
Set resultFile = SimpleCommands.CreateResultObject(dbName, 4, true, 1)
'Specifies the short name and description of the result file to be used in R&R
resultFile.ExtraValues.Add "ShortName", "Greater than 50'000"
resultFile.ExtraValues.Add "Description", "This result contains all transactions with amount greater than 50'000"
'Specifies the column order used in the report
resultFile.ExtraValues.Add "ReportColumns", "account_number, entity, amount"
'Specifies the maximum number of rows displayed in the report.
resultFile.ExtraValues.Add "RowCount", 10
'Add the result to the results collection.
SmartContext.TestResultFiles.Add resultFile
'Release objects
Set resultFile = Nothing
Set SimpleCommands = Nothing
End Sub