Hi all
Got a perplexing problem which I'm sure some of you can shed some light on
Developing a piece of code to open and run reports and had got part way throught when i decided to test it...the code so far:
This works fine - opens the report, refreshes and closes it. BUT when i have run this again, to double check - the second run causes a second BO session to open (without user or pswd prompts) and states that the document is not avaible. The code seems to give focus to this 'phantom' second session.
If I close my first session of BO and open it again, it works again :/
Any ideas?
I'm using excel 97 with BO ver 5.1.2
Cheers
Niti
Got a perplexing problem which I'm sure some of you can shed some light on
Developing a piece of code to open and run reports and had got part way throught when i decided to test it...the code so far:
Code:
Sub RunReport()
Dim buso As busobj.Application
Dim DP As busobj.DataProvider
Dim RT As busobj.Report
Dim DM As busobj.Document
Dim I As Integer
Application.Interactive = False
Application.DisplayAlerts = False
Set buso = CreateObject("BusinessObjects.Application")
buso.Interactive = True
buso.Visible = True
AppActivate "BusinessObjects"
buso.Documents.Open ("C:\Program Files\Business Objects\BusinessObjects 5.0\UserDocs\flood info.rep")
buso.ActiveDocument.Refresh
buso.ActiveDocument.Save
buso.ActiveDocument.Close
End Sub
This works fine - opens the report, refreshes and closes it. BUT when i have run this again, to double check - the second run causes a second BO session to open (without user or pswd prompts) and states that the document is not avaible. The code seems to give focus to this 'phantom' second session.
If I close my first session of BO and open it again, it works again :/
Any ideas?
I'm using excel 97 with BO ver 5.1.2
Cheers
Niti