I’m after the same information.
I have got an Excel Spreadsheet witch at 3:00am opens via a schedule task, that then opens up a session of Business Objects 11, then the Excel file loads in a report, refreshes it, exports it, saves the Report, closes the report then moves on to the next one and does the same thing.
That all works fine and is running over 60 reports a day no problem
Since these business objects reports are now “Automated” I want to be able to check them all for the following.
If any of the dataproviders in the reports give partial results
If any dataproviders have returned 0 rows
the last refreshed time and date.
To check them all I want to use a new excel file, again Excel will open the reports, but this time readonly, (seems to save time, might just be my PC) check the active report for the 3 sets of information above, and paste the results of these checks into a sheet within Excel.
This is what I have so far - but I need help. Code is all in excel 2007 on Windows Xp SP3
Sub Check_Reports()
Dim BOApp As Object
Set BOApp = CreateObject("BusinessObjects.Application")
With BOApp
.LoginAs "username", "Password", , "servername"
.Visible = True
.Documents.Open ("C:\reports\Report1.rep"), , ReadOnly
End With
Dim DocName As String
DocName = BOApp.ActiveDocument.Name
If BOApp.activedocument.dataprovider.PartialResults = True Then
Call UpdatePartial
else
If BOApp.activedocument.dataprovider.nbRowsFetched = 0 then
call ......
'etc etc etc
End If
End Sub
Sub UpdatePartial()
Sheets("Qcheck").Select.Range("A1").Select
Cells.Find(What:=DocName, After:=ActiveCell _
, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
Selection.Offset(0, 1).Select
Selection.Value = "Partial Results Error"
End Sub
it all goes wrong at the partialresults bit - BO is being referenced in Excel and partialresults is in the object browser.
Can anyone help?
Dreamscape (BOB member since 2009-05-14)