Hi,
I am wondering if it is possible to use BO XIr3.1 Auditing to query what reports have been sent to the users Inbox, or if there is another method other then Auditing please let me know.
Working with a particular test user I built the following query which takes the Template (parent report) CUID and the initials of the user and returns some reports, during further testing I have discovered the report doesn’t work for all users and doesn’t list all reports.
SELECT TOP 1 ae.Object_CUID
, ae.Start_Timestamp
, r.[Report_User]
, r.[Report_CUID]
, r.report_name
, ad.Detail_Text AS 'Template_ID'
FROM AUDIT_DETAIL ad
INNER JOIN AUDIT_EVENT ae ON ad.Event_ID = ae.Event_ID
AND ad.Server_CUID = ae.Server_CUID
INNER JOIN ( SELECT [dbo].[AUDIT_EVENT].[Object_CUID]
, MAX(CAST(Report_User AS VARCHAR(10))) AS 'Report_User'
, MAX(CAST(Report_CUID AS VARCHAR(150))) AS 'Report_CUID'
, MAX(CAST([Template_CUID] AS VARCHAR(150))) AS 'Template_CUID'
, MAX(CAST(Report_Name AS VARCHAR(150))) AS 'Report_Name'
FROM AUDIT_EVENT
INNER JOIN ( SELECT [Object_CUID]
, CASE WHEN [dbo].[AUDIT_DETAIL].[Detail_Type_ID] = 92 THEN [Detail_Text]
END AS 'Report_CUID'
, CASE WHEN [dbo].[AUDIT_DETAIL].[Detail_Type_ID] = 69 THEN [Detail_Text]
END AS 'Report_User'
, CASE WHEN [dbo].[AUDIT_DETAIL].[Detail_Type_ID] = 91 THEN [Detail_Text]
END AS 'Template_CUID'
, CASE WHEN [dbo].[AUDIT_DETAIL].[Detail_Type_ID] = 3 THEN [Detail_Text]
END AS 'Report_Name'
FROM DETAIL_TYPE
INNER JOIN AUDIT_DETAIL ON DETAIL_TYPE.Detail_Type_ID = AUDIT_DETAIL.Detail_Type_ID
INNER JOIN AUDIT_EVENT ON AUDIT_DETAIL.Event_ID = AUDIT_EVENT.Event_ID
AND AUDIT_DETAIL.Server_CUID = AUDIT_EVENT.Server_CUID
WHERE [Event_Type_ID] = 327687
AND [dbo].[AUDIT_DETAIL].[Detail_Type_ID] IN ( 69, 91, 92, 3 )
) a ON [dbo].[AUDIT_EVENT].[Object_CUID] = [a].[Object_CUID]
GROUP BY [dbo].[AUDIT_EVENT].[Object_CUID]
) r ON ae.[Object_CUID] = r.[Object_CUID]
AND CAST(ad.[Detail_Text] AS VARCHAR(150)) = r.[Template_CUID]
WHERE ad.Detail_Text LIKE 'Aah99QyrbtRNnhR0_5R8SFQ'
AND ae.[Event_Type_ID] = 327687
AND [r].[Report_User] = 'ABC'
ORDER BY [ae].[Start_Timestamp] DESC
I am thinking that for the test user, the reports were probably opened or something.
What I am wanting to do is retrieve the most recent instance of a report based for a parent report CUID for a particular user.
I have been able to retrieve the reports using Query Builder, I had to query all folders, choose a particular user and then use another query to list all objects in the Inbox. Is it possible to transfer QB to something more useful?
We are running BO XI 3.1, the reports are a mixture of WebI and DeskI reports all reports are sent to the users Inboxes in PDF format.
Your help is greatly appreciated.
matt_65 (BOB member since 2009-08-12)