I had a customer today that needed to find out what reports (webi and deski) on their Enterprise deployment that had become disconnected from their universe after a migration.
They were interested in writing a custom application to do this in .NET and after searching for forever thinking I had already written one I discovered that I had not...or at least had lost it if I had so off to writing I went.
This code just outputs the name of the object (it does not distinguish between webi or deski), the parent folder id, and the creation time of the object.
VB.NET Sample Code
<textarea cols="75" rows="10">
Imports CrystalDecisions.Enterprise
Partial Class _Default
Inherits System.Web.UI.Page
'Logon and Enterprise vars
Dim ceSessionMgr As New SessionMgr()
Dim ceSession As EnterpriseSession
Dim ceService As EnterpriseService
Dim ceInfoStore As InfoStore
Dim ceInfoObjects As InfoObjects
Dim ceInfoObject As InfoObject
Dim boUniObject As InfoObject
Dim boUniObjects As InfoObjects
'Used to store query string
Dim sQuery As String = ""
Dim userid As String = "Administrator" 'Enter user name here
Dim password As String = "" 'Enter password here
Dim aps As String = "JEXIR2NET2k5" 'Enter APS name here
Dim auth As String = "secEnterprise"
Dim UniverseId As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Log on to the CMS
ceSession = ceSessionMgr.Logon(userid, password, aps, auth)
ceService = ceSession.GetService("", "InfoStore")
ceInfoStore = New InfoStore(ceService)
'Grab all Webi and Deski templates
sQuery = "SELECT SI_Name, SI_PARENT_FOLDER, SI_CREATION_TIME, SI_Universe FROM CI_INFOOBJECTS WHERE (SI_Kind = 'Webi' or SI_Kind = 'FullClient') and si_instance = 0"
ceInfoObjects = ceInfoStore.Query(sQuery)
Response.Write("<b>Webi and Deski documents with no Universe</b>" & "<BR><BR>")
Response.Write("<table border=1 cellspacing=2>")
Response.Write("<tr><td><b>Document Name</b></td>")
Response.Write("<td><b>Folder ID</b></td>")
Response.Write("<td><b>Creation Date</b></td></tr>")
'Loop through the objects for the universe ids of webi docs
For Each ceInfoObject In ceInfoObjects
If ceInfoObject.Properties("SI_Universe").Properties("SI_TOTAL").Value.ToString = "0" Then
'Output name of the doc
Response.Write("<tr><td>" + ceInfoObject.Properties("SI_Name").ToString + " </td>")
Response.Write("<td>" + ceInfoObject.Properties("SI_Parent_Folder").ToString + " </td>")
Response.Write("<td>" + ceInfoObject.Properties("SI_CREATION_TIME").ToString + " </td></tr>")
End If
Next
End Sub
End Class
</textarea>
Have a great day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
40 | |
25 | |
17 | |
13 | |
8 | |
7 | |
7 | |
7 | |
6 | |
6 |