'++LotusScript Development Environment:2:5:(Options):0:74
Option Public
Option Explicit
'++LotusScript Development Environment:2:5:(Forward):0:1
Declare Function PickReportDescription (StrField As String) As String
'++LotusScript Development Environment:2:5:(Declarations):0:10
Dim w As NotesUIWorkspace
Dim s As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim uidoc As notesuidocument
Dim StrFieldv As Variant
Dim Str_ReportDescription As String
Dim StrField As String
Const STR_EMPTYSTRING= " "
Const STR_FIELDSAME= "%F is the same for both servers."
Const STR_FIELDNOTSAME= "%F are NOT the same:"
Const STR_FIELDSAMEORSUBSET= "%F is the same (or Source Server's value is a subset) for both servers."
Const STR_FIELDISDIFFERENT= "There are differences for %F:"
Const STR_FIELDNOTSETSOURCE= "%F is not set for %S (None allows all). %F for %T is:"
Const STR_FIELDNOTSETTARGET= "%F is not set for %T (None allows no one). %F for %S is:"
Const STR_DIFFNAMEDNETWORKS= "The following Name Networks available on source server %S are NOT available on target server %T:"
Const STR_SAMENAMEDNETWORKS= "The Name Networks available on source server %S are available on target server %T."
Const STR_NAMEDNETWORKTABLE= "The following is the Name Network table for source server %S and target server %T: %N%N%S: %T:"
Const STR_DIFFPORTS= "The following configured port/protocols available on source server %S are NOT available on target server %T:"
Const STR_PORTTABLE= "The following is the configured Port/Protocol table for source server %S and target server %T: %N%N%S: %T:"
Const STR_NOREPLICAS= "The following files on source server %S do NOT have replicas on the target server %T:"
Const STR_ALLREPLICAS= "All files on the source server %S have replicas on the target server %T."
Const STR_FILENAMECONFLICT= "The following files on source server %S have name conflicts with files on the target server %T:"
Const STR_NOFILENAMECONFLICT= "No files on the source server %S have name conflicts with files on the target server %T."
Const STR_SOURCEISMAILSERVER= "The following %F have the source server %S specified as the mail server:"
Const STR_NOSOURCEISMAILSERVER= "There were no %F with the source server %S specified as the mail server."
Const STR_DIFFCONNECTIONS= "The following connection sources available on source server %S are NOT available on target server %T:"
Const STR_SAMECONNECTIONS= "The connections (source) available on source server %S are available on target server %T."
Const STR_SOURCEASDESTINATION= "The following servers list the server to be decommissioned, %S, as a destination in their connection records:"
Const STR_NOSOURCEASDESTINATION= "There were no servers that listed the server to be decommissioned %S, as a destination in their connection records."
Const STR_SOURCEINPROGRAM= "The following programs are listed for the server to be decommissioned"
Const STR_NOSOURCEINPROGRAM= "There were no programs listed for the server to be decommissioned."
Const STR_SOURCEASFOREIGNDOMAIN= "The following foreign domains have the server to be decommissioned, %S, specified as the foreign domain mail server:"
Const STR_NOSOURCEASFOREIGNDOMAIN= "There were no foreign domains that listed the server to be decommissioned as the foreign domain mail server."
Const STR_SOURCEXCERTISSUEDBY= "The following cross certificates were issued by the server to be decommissioned, %S:"
Const STR_NOSOURCEXCERT= "There were no cross certificates issued by the server to be decommissioned."
Const STR_SAMECLUSTER= "The server to be decommissioned %S and the target server %T both belong to the same cluster:"
Const STR_DIFFCLUSTER= "The server to be decommissioned %S and the target server %T do NOT belong to the same cluster:"
Const STR_TARGETNOTINCLUSTER= "The target server %T is NOT a member of a cluster. The server to be decommissioned %S belongs to cluster:"
Const STR_SOURCENOTINCLUSTER= "The server to be decommissioned %S is not part of a cluster."
Const STR_FIELDGREATERONSOURCE="%F is greater on the source server %S than the target server %T."
Const STR_FIELDGREATERONTARGET="%F is greater on the target server %T than the source server %S."
'++LotusScript Development Environment:2:1:PickReportDescription:1:8
Function PickReportDescription (StrField As String) As String
If doc.GetItemValue("ErrorFlag")(0) = "2" Then
Str_ReportDescription=STR_EMPTYSTRING
'exit function
Elseif StrField = "Name Network" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_DIFFNAMEDNETWORKS
'exit function
Elseif StrField = "Name Network" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_SAMENAMEDNETWORKS
'exit function
Elseif StrField = "Port/Protocol" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_DIFFPORTS
'exit function
Elseif StrField = "No Matching Replica" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_NOREPLICAS
'exit function
Elseif StrField = "No Matching Replica" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_ALLREPLICAS
'exit function
Elseif StrField = "Name Conflict" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_FILENAMECONFLICT
'exit function
Elseif StrField = "Name Conflict" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_NOFILENAMECONFLICT
'exit function
Elseif (StrField = "Mail Users" Or StrField = "Mail-In Databases" Or StrField="Certifiers" Or StrField="Rooms" Or StrField="Resources") And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_SOURCEISMAILSERVER
'exit function
Elseif (StrField = "Mail Users" Or StrField = "Mail-In Databases" Or StrField="Certifiers" Or StrField="Rooms" Or StrField="Resources") And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_NOSOURCEISMAILSERVER
'exit function
Elseif StrField = "Source" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_DIFFCONNECTIONS
'exit function
Elseif StrField = "Source" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_SAMECONNECTIONS
'exit function
Elseif StrField = "Destination" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_SOURCEASDESTINATION
'exit function
Elseif StrField = "Destination" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_NOSOURCEASDESTINATION
'exit function
Elseif StrField = "Program" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_SOURCEINPROGRAM
'exit function
Elseif StrField = "Program" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_NOSOURCEINPROGRAM
'exit function
Elseif StrField = "Foreign Domains" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_SOURCEASFOREIGNDOMAIN
'exit function
Elseif StrField = "Foreign Domains" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_NOSOURCEASFOREIGNDOMAIN
'exit function
Elseif StrField = "Cross Certificates" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_SOURCEXCERTISSUEDBY
'exit function
Elseif StrField = "Cross Certificates" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_NOSOURCEXCERT
'exit function
Elseif StrField = "ClusterName" And doc.GetItemValue("RDType")(0) = "C" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription = STR_SAMECLUSTER
'exit function
Elseif StrField = "ClusterName" And doc.GetItemValue("RDType")(0) = "C" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription = STR_DIFFCLUSTER
'exit function
Elseif StrField = "ClusterName" And doc.HasItem("RDType") = False And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription = STR_TARGETNOTINCLUSTER
'exit function
Elseif StrField = "ClusterName" And doc.HasItem("RDType") = False And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription = STR_SOURCENOTINCLUSTER
'exit function
Elseif doc.GetItemValue("RDType")(0) = "B" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_FIELDSAME
'exit function
Elseif doc.GetItemValue("RDType")(0) = "B" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescription=STR_FIELDNOTSAME
'exit function
Elseif doc.GetItemValue("RDType")(0)="S" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescription=STR_FIELDSAMEORSUBSET
'exit function
Elseif doc.GetItemValue("RDType")(0) = "N" Then
Str_ReportDescription=STR_FIELDSAME
'exit function
Elseif doc.GetItemValue("RDType")(0) = "NS" Then
Str_ReportDescription=STR_FIELDGREATERONSOURCE
'exit function
Elseif doc.GetItemValue("RDType")(0) = "NT" Then
Str_ReportDescription=STR_FIELDGREATERONTARGET
'exit function
Elseif doc.GetItemValue("ErrorFlag")(0)="1" And doc.HasItem("RDType") = False And doc.HasItem("RDErrorStatus") = False Then
Str_ReportDescription=STR_FIELDISDIFFERENT
'exit function
Elseif doc.GetItemValue("ErrorFlag")(0) = "1" And doc.GetItemValue("RDErrorStatus")(0) = "A" And doc.HasItem("RDType") = False Then
Str_ReportDescription=STR_FIELDNOTSETSOURCE
'exit function
Elseif doc.GetItemValue("ErrorFlag")(0) = "1" And doc.GetItemValue("RDErrorStatus")(0) = "N" And doc.HasItem("RDType") = False Then
Str_ReportDescription=STR_FIELDNOTSETTARGET
'exit function
End If
PickReportDescription = str_reportdescription
End Function
Lotus Product
OBJECT
,\ }P #
,, }P #
,, }P #
Report'++LotusScript Development Environment:2:5:(Options):0:66
'++LotusScript Development Environment:2:5:(Forward):0:1
Declare Function ReportDescription (StrField As String) As String
Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
'++LotusScript Development Environment:2:5:(Declarations):0:2
'++LotusScript Development Environment:2:2:BindEvents:1:129
Private Sub BindEvents(Byval Objectname_ As String)
Static Source As NOTESUIDOCUMENT
Set Source = Bind(Objectname_)
On Event Queryopen From Source Call Queryopen
End Sub
'++LotusScript Development Environment:2:1:ReportDescription:1:8
Function ReportDescription (StrField As String) As String
If doc.GetItemValue("ErrorFlag")(0) = "2" Or doc.GetItemValue("ReportErrors")(0) <> "" Then
Str_ReportDescription=STR_EMPTYSTRING
Exit Function
Elseif StrField = "Name Network" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_DIFFNAMEDNETWORKS
Exit Function
Elseif StrField = "Name Network" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescritption=STR_SAMENAMEDNETWORKS
Exit Function
Elseif StrField = "Port/Protocol" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_DIFFPORTS
Exit Function
Elseif StrField = "No Matching Replica" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_NOREPLICAS
Exit Function
Elseif StrField = "No Matching Replica" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescritption=STR_ALLREPLICAS
Exit Function
Elseif StrField = "Name Conflict" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_FILENAMECONFLICT
Exit Function
Elseif StrField = "Name Conflict" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescritption=STR_NOFILENAMECONFLICT
Exit Function
Elseif (StrField = "Mail Users" Or StrField = "Mail-In Databaes" Or StrField="Certifiers" Or StrField="Rooms" Or StrField="Resources") And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_SOURCEISMAILSERVER
Exit Function
Elseif (StrField = "Mail Users" Or StrField = "Mail-In Databaes" Or StrField="Certifiers" Or StrField="Rooms" Or StrField="Resources") And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescritption=STR_NOSOURCEISMAILSERVER
Exit Function
Elseif StrField = "Source" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_DIFFCONNECTIONS
Exit Function
Elseif StrField = "Source" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescritption=STR_SAMECONNECTIONS
Exit Function
Elseif StrField = "Destination" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_SOURCEASDESTINATION
Exit Function
Elseif StrField = "Destination" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescritption=STR_NOSOURCEASDESTINATION
Exit Function
Elseif StrField = "Program" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_SOURCEINPROGRAM
Exit Function
Elseif StrField = "Program" And doc.HasItem("ErrorFlag") = False Then
Str_ReportDescritption=STR_NOSOURCEINPROGRAM
Exit Function
Elseif StrField = "Foreign Domains" And doc.GetItemValue("ErrorFlag")(0) = "1" Then
Str_ReportDescritption=STR_SOURCEASFOREIGNDOMAIN
Exit Function
Elseif StrField = "Foreign Domains" And doc.HasItem("ErrorFlag") = False Then