Showing posts with label Business Objects. Show all posts
Showing posts with label Business Objects. Show all posts

February 19, 2008

How to create folders programatically in Business Objects XI repository

This is an example of how to create folders in the Business Objects XI InfoStore using VB6 and the COM API. This code creates a folder called "MyNewFolder" beneath "TestFolder", which is created at the folder root.



Dim sessionMgr, entSession, infoStore, pluginMgr, folderPlugin

'create a session and connect to the InfoStore
Set sessionMgr = CreateObject("CrystalEnterprise.SessionMgr")
Set entSession = sessionMgr.Logon("Administrator", "myPassword", "myBoServer", "secEnterprise")
Set infoStore = entSession.Service("", "InfoStore")
Set pluginMgr = infoStore.PluginManager
Set folderPlugin = pluginMgr.PluginInfo("Folder")

Dim infoObjectCollection, newFolder

Set infoObjectCollection = infoStore.NewInfoObjectCollection()
Set newFolder = infoObjectCollection.Add(folderPlugin)

newFolder.Title = "MyNewFolder"
newFolder.Description = "This is the folder we're creating in the example"

Dim infoObjectCollectionAux 'used to help determine the parent folder id
Dim queryStr As String
Dim queryStr1 As String
Dim queryStr2 As String

'build a query to get the parent folder id
'you can test this using the Query Builder in the Admin Launchpad
queryStr1 = "SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME='"
queryStr2 = "' AND SI_KIND='Folder' AND SI_PARENTID=0" 'the root folder has id=0
queryStr = queryStr1 & "TestFolder" & queryStr2

'execute the query and get the parent folder id
'if "TestFolder" doesn't exist in the root, the infoObjectCollectionAux will be empty
Set infoObjectCollectionAux = infoStore.Query(queryStr)
Dim parentFolderId As Long
'only get the first item, for example simplicity sake
parentFolderId = infoObjectCollectionAux.Item(1).Id

'set the new folder's parent id and commit the changes
newFolder.ParentID = parentFolderId
infoStore.Commit (infoObjectCollection)

November 21, 2007

The page cannot be found in Infoview

In Business Objects XI, you may get an error saying The page cannot be found when trying to access InfoView or the Central Management Console. One cause for this problem is that, on Windows Server 2003, IIS 6.0 blocks .NET 2.o .aspx applications by default. To enable them, go to Administrative Tools -> Internet Information Services (IIS) Manager, click the Web Service Extensions, select ASP .NET v2.0xxxx and click Allow.

Detailed info on this operation:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/596ff388-bc4c-472f-b029-aea2b0418bea.mspx?mfr=true

[repo_proxy 13] SessionFacade::openSessionLogon with user info has failed

When trying to log on to InfoView on BusinessObjects XI, you may get this error because the CMS can't be contacted. This may be happen because of a firewall or traffic filtering on your network. The first reason is reasonably easy to solve: make sure there is no firewall blocking you in the path from the client to the BO server. If you suspect it's the latter, try putting localhost on the System textbox.

October 15, 2007

Secured connection unavailable while editing a Universe

When using Business Objects Designer to create a Universe you can only export it to the CMS database if it has a Secured connection. If you're trying to change the connection type and the "Secured" option isn't available, it may be a matter of user rights: you need permissions to create a Universe in order to change the connection type.