1471513 - How to retrieve FullName, e-mail from CMS repository - using BOE SDK for VS .NET

SAP Knowledge Base Article - Public

1471513 - How to retrieve FullName, e-mail from CMS repository - using BOE SDK for VS .NET

Symptom

Need to capture the Fullname and e-mail from the CMS repository and use that for further purposes

Resolution

Use the following code:

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports CrystalDecisions.Enterprise
Imports CrystalDecisions.Enterprise.infostore
Imports CrystalDecisions.Enterprise.Desktop
Public Sub Main()
Dim boSessionMgr As New SessionMgr
Dim boEnterpriseSession As EnterpriseSession = boSessionMgr.Logon("ceuser", "cepassword", "server", "secEnterprise")
Dim boInfostore As New InfoStore(boEnterpriseSession.GetService("InfoStore"))
'Dim boInfoobjects As InfoObjects
Dim Users As InfoObjects
Dim UserItem As InfoObject
Dim UserObject As User
Dim Fullname As String
Dim EEmail As String
Dim cTitle As String
Dim Counter As Integer = 1
'This query will bring back all infoobjects that are recurring schedules
Users = boInfostore.Query("SELECT TOP 1000000 SI_EMAIL_ADDRESS, SI_FORCE_PASSWORD_CHANGE, SI_NAME, SI_ID, SI_USERGROUPS, SI_USERFULLNAME, SI_ALIASES, SI_DESCRIPTION, SI_LASTLOGONTIME, SI_PASSWORDEXPIRE FROM CI_SYSTEMOBJECTS Where SI_KIND='User'")
For Each UserItem In Users
UserObject = CType(UserItem, User)
Fullname = UserObject.FullName
EEmail = UserObject.EmailAddress

Keywords

Forum Thread , KBA , BI-RA , Reporting, analysis, and dashboards , How To

Product

Crystal Reports 2008 V1