Open Business Objects from Excel

Hello,

I would like to open an instance of BusinessObjects 6.5 (Reporter) in order to extract data about *.rep file. Is anyone know how to launch the instance?

I know how to launch an instance of Designer:

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
DesApp.Window.State = dsMinimized
DesApp.Visible = True
Application.StatusBar = "Logging in..."
Call DesApp.LoginAs

'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

But I want to do this for BusinessObjects 6.5 (Reporter).
I don’t know if I need the following code line:

Dim BOApp As busobj.Application

but it returns me a message error (compiling error).

Please help me!!!

rfesc


rfesc :fr: (BOB member since 2008-07-30)

Hi,

Have you referenced BusinessObjects 6.5 Object library in your VBA project in XLS?


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Yes! I also tried to add the others Business Objects libraries but it did change nothing…


rfesc :fr: (BOB member since 2008-07-30)

Hi,

When I referenced BusinessObjects 6.5 Object Library then this piece of code works for me:

Dim BOApp As busobj.Application
Set BOApp = New busobj.Application
Call BOApp.LoginAs

Marek Chladny :slovakia: (BOB member since 2003-11-27)

I removed BO XIR2 from my computer and the creation of an instance of BO 6.5 from Excel worked!

Actually, I need to control BO from Excel in order to extract some information about a BO document, but I do not know how I should do so as to examine whether there are the following elements in my BO document:

**Concerning the Report Side:
Filter like ?
Filter in a block applied on a measure?
Hide Section Header/Footer formula?
Hide Block formula?
Hide object (in the Block Pivot settings)?
Hide cell formula (freestanding cells)
OLE object?
Picture?
VBA macro?
Across Edge Display (crosstab)?

**Concernint Break:
Page break header/footer after page break settings?
Break on multiple dimensions?
Break on an object not in the block?
Folded break?
Value-based break?
Page setup options?
Functions?
CountAll?
Date formats?
Relative dates?
Fill character?
Border styles?
Variable description?
Variable that references another variable that cannot be converted?
Grouped variables?
Block sorted on an object not included in the block?

**Concerning charts:
Multiple groups?
3D Pie Charts plot area?
3D Charts plot area?
Series colors?
Rotation, elevation and start angle?
Wall color?

**Concerning Save:
Write password or protection password set?

Is there anybody would know how to proceed or what is the VBA name of theses elements?
I have some knowledge in VBA for Excel but I do not know very much VBA for BO and I have not found many books on this subject!!!
Any contribution is welcome!!

rfesc


rfesc :fr: (BOB member since 2008-07-30)

I suspect that this would be due to the VBA keyword changes between versions…


Mak 1 :uk: (BOB member since 2005-01-06)

rfesc,

Many of the properties/elements of BO document (maybe most of them) that you are interested in are simply not exposed in VBA. :nonod:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

However, are these properties exposed in Visual Basic anywhere?
For the moment I know how I can list DataProviders (For Each DProv In Doc.DataProviders) and Queries (For Each Qry In DProv.Queries) with Results (For Each Res In Qry.Results) & Conditions (For Each Cond In Qry.Conditions)…

rfesc


rfesc :fr: (BOB member since 2008-07-30)

You would have to ask the question as to why would they…?
BOs VBA object libarary is BO specific, whereas general VBA is non application specific, except for microsoft apps, of course…:).


Mak 1 :uk: (BOB member since 2005-01-06)

Hi All,

I want to run BO Reporter from Excel and am novice in it.
can anybody help to provide the code so it would be helpful for me.

I did search on this forum but couldn’t find any code which will help for my task.

waiting for Gurus help !

Thank you,


Mond (BOB member since 2006-07-31)

Good morning everybody
I wrote this piece of code. With your help i think we can answer to the question how to open BO reports from ecxel.
My problem on the code below is that it import BO data to an excel file but then excel “freezes”…i have to say to the code to close the excel after finishing but i dont know how…in fact i do not understand very well what the problerm is. Moreover i need to be able to save the data in new sheets in an allready existing excel

Sub vbo()

Dim Buso As busobj.Application
'Dim xl As Excel.Application
Dim DP As busobj.DataProvider
Dim HP As busobj.Document
Dim HT As busobj.Report
Dim i As Integer

    Application.Interactive = False
    Application.DisplayAlerts = False
    
    Set Buso = CreateObject("BusinessObjects.Application")
        Buso.LoginAs "xxxxx", "xxxx"
        Buso.Interactive = True
        Buso.Visible = False
        Buso.Documents.Open ("path of the file")
        Buso.ActiveDocument.Refresh
        Buso.ActiveDocument.SaveAs ("where to save xls")
        Buso.Quit
        Set Buso = Nothing
End Sub

Thnx for your help

[Moderator Edit: Added code formatting - Jansi]


aloupis :greece: (BOB member since 2009-09-10)

Thanks for the reply, but how do I create the data provider? The code in Excel is like this :

Option Explicit
Dim app As busobj.Application
Sub CreateReport()
Set app = CreateObject(“BusinessObjects.Application”)
app.Visible = True
app.Interactive = True
Call app.LogonDialog
’ app.Quit
’ Set app = Nothing
End Sub

Let’s say the universe name is Universe, and the objects used are Revenue and Month. How do I create a data provider and a report with these objects ?


andreiv (BOB member since 2009-11-16)

Moderator Note: Please carry on here. Please don’t post the questions for the same issue in more than one place.


Jansi :india: (BOB member since 2008-05-12)