auditLiveReport (Oracle)=A<1,?,'conf_names'='','conf_values'='','dangerBox'=?,'databaseSelect'='currentlivelink','DataSrc'='Sql','displaytype'='autoreport','fields'={},'generateXml'=?,'headers'={},'inputOrder'=A<1,?,'earliest'=1,'startnodes'=3,'subtypes'=2>,'inputs'={A<1,?,'inputType'='Date','label'='earliest','prompt'='Earliest Change'>,A<1,?,'inputType'='SQLList','label'='subtypes','prompt'='Node (Sub)Types'>,A<1,?,'inputType'='SQLList','label'='startnodes','prompt'='Start Nodes'>},'oldDataId'=215324,'params'={'USERINPUT1','USERINPUT2','#FilterPermissions','#UserID','USERINPUT3'},'promptIf'='CHECKED','securemode'=true,'ShowVerboseDatabaseErrorMessages'=true,'sql'='SELECT DAuditNew.DataID, AuditStr, MAX(AuditDate) AS "MaxAuditDate"\r\n-- The JOIN is needed to make the permissions filter (see below) work\r\n-- LEFT OUTER JOIN is needed to still get Purge audit events\r\nFROM DAuditNew LEFT OUTER JOIN DTreeCore DTree ON DAuditNew.DataID = DTree.DataID\r\nWHERE AuditDate >= %1 -- Timestamp including seconds\r\nAND DAuditNew.SubType IN %2 -- List configured in ContentTraversalProperties.typeIds\r\nAND (\r\n    -- Some event names must be split to avoid OTCS\' filter of\r\n    -- keywords which can modify the DB\r\n    AuditStr IN (\'AddHold\',\r\n                 \'AddVersion\',\r\n                 \'AssignCrossReferenceCode\',\r\n                 \'AttrChange\',\r\n                 \'CategoryRemoved\',\r\n                 \'ClassificationAssigned\',\r\n                 \'ClassificationRemoved\',\r\n                 \'CLMRoleMembership\',\r\n                 \'Cre\'||\'ate\',\r\n                 \'De\'||\'lete\',\r\n                 \'DelVersion\',\r\n                 \'EmailMetadataChanged\',\r\n                 \'EssentialChanged\',\r\n                 \'MajorMinorDisable\',\r\n                 \'MajorMinorEnable\',\r\n                 \'Move\',\r\n                 \'OwnerChange\',\r\n                 \'ProjectMembership\',\r\n                 \'RecordDateOrReceivedDateChanged\',\r\n                 \'RemoveCrossReferenceCode\',\r\n                 \'RemoveHold\',\r\n                 \'Ren\'||\'ame\',\r\n                 \'Reserve\',\r\n                 \'Rest\'||\'ore\',\r\n                 \'RMClassificationAdded\',\r\n                 \'RMClassificationRemoved\',\r\n                 \'scmClearanceChanged\',\r\n                 \'scmSuppMarkInfoChanged\',\r\n                 \'StatusChanged\',\r\n                 \'Unreserve\')\r\n    OR AuditStr = \'PermChange\' AND (\r\n        -- Added or deleted permission\r\n        Value1 IS NULL OR Value2 IS NULL\r\n        -- Permission change removing or adding See (130 / 0x82 / bits 1, 7)\r\n        -- or See Contents (36995 / 0x9083 / bits 0, 1, 7, 12, 15)\r\n        OR BITAND(CAST(Value1 AS INTEGER DEFAULT NULL ON CONVERSION ERROR), 36995) = 36995 AND NOT BITAND(CAST(Value2 AS INTEGER DEFAULT NULL ON CONVERSION ERROR), 36995) = 36995\r\n        OR NOT BITAND(CAST(Value1 AS INTEGER DEFAULT NULL ON CONVERSION ERROR), 36995) = 36995 AND BITAND(CAST(Value2 AS INTEGER DEFAULT NULL ON CONVERSION ERROR), 36995) = 36995))\r\nAND (DTree.DataID IS NULL\r\n    OR (\r\n        -- ACL permissions filter for the connector user\r\n        (%3)\r\n        -- Security clearance level permission filter for the connector user\r\n        AND NOT EXISTS (SELECT dscl.DataID FROM RMSec_DocClearance dscl\r\n            WHERE dscl.DataID = DTree.DataID AND dscl.CurrentSecurity >\r\n                (SELECT uscl.Clearance FROM RMSec_Clearance uscl\r\n                    WHERE uscl.UserID = %4))\r\n        -- Supplemental markings permission filter for the connector user\r\n        AND NOT EXISTS (SELECT dsm.DataID FROM RMSec_DocSuppMark dsm\r\n            WHERE dsm.DataID = DTree.DataID AND dsm.SuppMark NOT IN\r\n                (SELECT usm.SuppMark FROM RMSec_UserSuppMarks usm\r\n                    WHERE usm.UserID = %4))\r\n        -- Check that at least one ancestor is a configured start node\r\n        AND (NOT EXISTS (SELECT DataID FROM DTreeAncestors\r\n                WHERE DTreeAncestors.DataID = DTree.DataID)\r\n            OR (\r\n                EXISTS (SELECT DataID FROM DTreeAncestors\r\n                    WHERE DTreeAncestors.DataID = DTree.DataID\r\n                        AND AncestorID IN (%5))\r\n        ))\r\n    ))\r\nGROUP BY DAuditNew.DataID, AuditStr\r\nORDER BY "MaxAuditDate" ASC\r\n','subreport_id'=?,'subreport_parms'={},'templates'={},'title'='Raytion Connector Change Processing LiveReport','usecursor'=false,'usetransact'=true>

