BusinessObjects Board

Question regarding Documenting a Universe

Hi,

I was going through the three separate excel sheets for documenting a universe for three different versions of business objects available in BOB Downloads. On going through them, I found out that the code used in all the sheets is same. But, yet there is a demarcation between the versions of business objects. I have a few questions on the same.

  1. How is this being done? Where is the demarcation factor?
  2. Is there an addition plug-in in excel sheet apart from version 11.5 Designer classes?

Please help me out in the same.

Regards
Shamit


shamit_mankad :india: (BOB member since 2006-05-04)

I assume you are referring to the utilities here. Take a closer look and you will find that the code is slightly different in the XIr2 version. The .LoginAs method has been deprecated in favor of .Logon, .LogonDialog, and .LogonWithToken due to the changes in underlying architecture. Anything that has to do with repository interaction is changed. Find the object model diagrams for Designer here and they are color coded to highlight changes in the XI version.

In addition, the CLSID for the XI version is different. If you open the 5.x or 6.x version on a machine that only has XI installed, the reference (VB Editor, Tools, References) to the Designer object model will be missing. With most software, the object models are upward compatible (same CLSID), but not in this case.

Hope that helps.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Hi Dwayne,

As you have suggested that the .LoginAs method has been deprecated in favor of .Logon in BO XI R2 because of its underlying structure.

Is it possible to pass the user information through parameter in .Logon call
like the syntax of Logon is

Sub Logon(UserName As String, password As String, CMS as String, authenticationMode as String )

Example
Logon(“Administrator”, “”, “MyServer”, “secEnterprise”)

So that I don’t have enter the username and password information through dialog box. It should automatically takes the user name, password, CMS server name, authentication mode from the code itself.

I have tried it using the following code

var.Logon(“Administrator”, “”, “ServerName”, “secEnterprise”)

but I am getting the error

“Designer-31: Error in LoginAs”

I have already cheked the reference library to BO 11.5 objects and designer library in VBA.

Thanks and regards,


Suraj
Mumbai, India


suraj_228 :india: (BOB member since 2007-03-08)

Yes it should work:



Dim ObjDes As Designer.Application

Set ObjDes = New Designer.Application

ObjDes.Interactive = False    ' we are in batch
ObjDes.Visible = False          ' we are in batch 

Call ObjDes.Logon(strUser, strPwd, strRepo, strAMode)

'  for the mode you can select between:
'
'   If (strAMode <> "secWindowsNT" And strAMode <> "secWinAD" 
'       And strAMode <> "secLDAP") Then 
'      strAMode = "secEnterprise"
'   End If

' strRepo is the name of the systemdb; in our case it is the computer 
' name where BOXI is running , without port-number

Hope it helps,
bernd


BerndB :de: (BOB member since 2006-05-17)

Hi BerndB,

Thanks for the reply, But the code you suggested doesn’t work.

What I actually want to do is… I have written a macro which would open the BO Designer and document all the Objects, Classes, Tables, Joins, Conditions, Contexts, Hierarchies etc from a partucular selected universe…

It works fine with BO 6.5 while documenting in offline mode and the login function Call var.LoginAs works fine without any parameter.

As i am doing same in BO XI with the following code

Call DesApp.Logon(“suraj”, “suraj”, “CMS”, “secEnterprise”)

here suraj is username
suraj is password
CMS is servername
secEnterprise Authentication Mode

But it is giving error “Designer-31:Error in LoginAs”

As i think BO XI doesn’t allow user to work in offline mode.

So, do you have any idea how to bypass the Dialog Box which asked user to enter username, password,servername, authentication mode.

Thanks and regards,

Suraj


suraj_228 :india: (BOB member since 2007-03-08)

Hi,

The dialog box does not occur when you set the properties Interactive and visible…

ObjDes.Interactive = False ’ we are in batch
ObjDes.Visible = False ’ we are in batch

regards,
bernd


BerndB :de: (BOB member since 2006-05-17)

Hi BerndB,

Still I am not able to bypass the User Authentication Window (pic attach). the code you suggested doesn’t work while documentin Universe in BO XI R2.

ObjDes.Interactive = False ’ we are in batch
ObjDes.Visible = False ’ we are in batch

Could you help me out regarding this futher…

My code is as given below…

I have just changed the Call DesApp.LogonDialog to Call DesApp.Logon(“suraj”, “suraj”, “M2A-10-D-199.cms”, “secEnterprise”) with my

user name=suraj

password=suraj

Servername=M2A-10-D-199.cms and

Authentication mode=secEnterprise

to by pass the user authentication windows while login into the Universe. I have also set the DessApp.Interactive = False in the code.


Sub DocumentUniverse()

Dim DesApp As Designer.Application
Dim Univ As Designer.Universe
Dim CurrentApp As String
On Error GoTo ErrorHandler

'some Excel housekeeping
CurrentApp = Application.Caption
Application.Cursor = xlWait
Application.DisplayAlerts = False

'start Designer and log in
Set DesApp = New Designer.Application

[b]DessApp.Interactive = False[/b] 
DesApp.Window.State = dsMinimized
DesApp.Visible = False
Application.StatusBar = "Logging in..."

'Call DesApp.LogonDialog

[b]Call DesApp.Logon("suraj", "suraj", "M2A-10-D-199.cms", "secEnterprise") [/b]
'open a universe
Application.StatusBar = "Opening universe..."
Set Univ = DesApp.Universes.Open
'DesApp.Visible = False

'restore Excel as active application
Call AppActivate(CurrentApp)
Application.ScreenUpdating = True

'call separate procedure for each part of the universe
Call ListTables(Univ.Tables)
Call ListColumns(Univ.Tables)
Call ListJoins(Univ.Joins)
Call ListContexts(Univ.Contexts)
Call ListClasses(Univ.Classes, 1)
Call ListObjects(Univ.Classes, 1)
Call ListConditions(Univ.Classes, 1)

CleanUp:
On Error Resume Next
Application.StatusBar = False
Application.Cursor = xlDefault
Univ.Close
Set Univ = Nothing
DesApp.Quit
Set DesApp = Nothing
Exit Sub

ErrorHandler:
Call AppActivate(CurrentApp)
MsgBox Err.Source & " - " & Err.Number & ": " & Err.Description, _
vbCritical, “Failure in DocumentUniverse()”
Resume CleanUp

End Sub


Still I am getting the same error. Could you suggest why this is happenning and how to bypass thw User Authentication Mode …

Thanks and regards,

Suraj,
pic.JPG


suraj_228 :india: (BOB member since 2007-03-08)

It looks like y typo in your code:

Set DesApp = New Designer.Application

DessApp.Interactive = False

  • use DesApp.Interactive (Des with one-single ‘s’)

Concerning the logon parameter. Have you tried “M2A-10-D-199” for the server name?

regards,
bernd


BerndB :de: (BOB member since 2006-05-17)

Agreed … I think the .cms on the end could be causing the problem.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

hi BerndB,

Thanks for the suggestions…Now it’s working fine…

With regards,
Suraj


suraj_228 :india: (BOB member since 2007-03-08)

:smiley:

bernd


BerndB :de: (BOB member since 2006-05-17)