SmartAging
Properties:
Alias of the logical input database associated with the control.
The tag ID or the field associated with the control.
If set to true, it means that the associated tags have to be interpreted as field names. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower version of IDEA.
Defines if a control is optional or not, i.e. if the user has to set it or not.
The name for the control that will be displayed in the report.
The order in which the controls will be displayed in the reports. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower version of IDEA.
Defines whether or not the output of the control is stored when the parent dialog is closed. Its default value is "True". In case this property is set to "False" the save routine of SmartAnalyzer is not storing the data entered into the corresponding input control."True" means the data will be stored and is available when opening the dialog a second time. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower version of IDEA.
If set to true the control will be shown in the report. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower version of IDEA.
The list of tags that will enable or disable the control. The list of tags will be added based on the following schema: <input database alias>^<tag ID>. This property is only available for IDEA version 10 or higher. Do not change it if you plan to use the dialog for a lower version of IDEA.
Example
Sub Main()
Dim oDB As Object
Dim oTask As Object
Dim oParameters As Object
Dim oAging As Object
Dim dbname As String
Dim sDateColumnName As String
Dim sAoumntColumnName As String
Set oDB = Client.OpenDatabase(SmartContext.PrimaryInputFile)
'Get parameters from SmartContext.
Set oParameters = SmartContext.Parameters
If oParameters.Contains("SmartAging1") Then
Set oAging = oParameters.Item("SmartAging1")
Set oTask = oDB.Aging
'************************************
'The following lines are only a shortcut.
'The date and the amount fields have to be tagged by the user
'and have to be determined within the macro.
'************************************
sDateColumnName = "DueDate"
sAmountColumnName = "Amount"
oTask.Info oAging.StartDate, sDateColumnName, sAmountColumnName
oTask.IntervalTypeIndex = oAging.IntervalType '0=Days/1=Month/2=Years
oTask.Intervals oAging.Interval1, oAging.Interval2, oAging.Interval3, oAging.Interval4, oAging.Interval5, oAging.Interval6
dbName = Client.UniqueFileName("Aging Result File")
oTask.CreateAgeDB dbName,
oTask.IncludeAllFields
oTask.PerformTask
Set oTask = Nothing
Set oAging = Nothing
End If
Set oParameters = Nothing
oDB.Close
Set oDB = Nothing
End Sub