15 pts.
 VB script to open a Business Objects report
Hello, I would like to know how I can write a windows script to open a Business Object report. So far, I have gotten it to open up the Business Object application, but does not want to open up the report. This is what I have so far. It works until you get to the Getfile. Any help would be appreciated. Dim F Set objbo = CreateObject("WScript.Shell") set anobj = CreateObject("Scripting.FileSystemObject") objbo.Exec ("C:Program FilesBusiness ObjectsBusinessObjects Enterprise 6binbusobj.exe") WScript.Sleep 5500 objbo.SendKeys"xxxxxx" objbo.SendKeys"{ENTER}" f = anobj.Getfile("\Rmregfile002userse716666Business ObjectsprgHospitalClaim.rep")

Software/Hardware used:
ASKED: April 8, 2008  7:12 PM
UPDATED: September 1, 2010  3:42 PM

Answer Wiki:
This code works for me : Sub GetBOData() Dim BoApp As busobj.Application, BODoc As busobj.Document, BORep As busobj.Report Dim i As Integer Set BoApp = CreateObject("BusinessObjects.application") With BoApp .LoginAs "jjacob", "jerry" .Visible = True .Documents.Open ("C:\JerryDesktopABC UploadABC Trends.rep") With .ActiveDocument .Refresh i = 1 For Each rpt In .Reports rpt.Activate BoApp.CmdBars(2).Controls("&Edit").Controls(20).Execute Sheets(i).Select Range("A1").Select ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _ False i = i + 1 Next End With End With Set BoApp = Nothing Set BODoc = Nothing End Sub
Last Wiki Answer Submitted:  June 3, 2008  10:11 am  by  Jerry Lees   5,320 pts.
All Answer Wiki Contributors:  Jerry Lees   5,320 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Be sure and check out my blog here on ITKE for more Network administration and VBSCRIPT tips.
The VBScript Network and Systems Administrator’s Cafe

 5,320 pts.

 

Thank you for the response. Business Objects also owns Crystal Reports, I’m not sure if your familiar with Crystal, but they are both owned by the same company. It’s hard to describe Business Objects other than saying its a Business Intelligence application. It has both a desktop version and what they call a “webi” version (web application). Anyways, to get into the application (desktop or webi) you must supply a username and password, which is why I had the send keys in there. Its my intent to have the application be up and running first. Then have the .rep file be opened.
To make a comparison, let’s say I want to automate a task of opening a specific microsoft excel file (workbook), I would want to have the microsoft excel application up and running then get the specific excel workbook that you need to have open, which is what I’m trying to get this vb script to do. The thing about excel is that you don’t need to provide a password and username to open excel as an application.
I tried replacing the exec path to the specific file, but it does not work because the application of Business Objects is not running. Even if Business Objects was running, it would not execute. Anything else that I should try ? Thanks.

 15 pts.

 

Hi,

Thanks for the code… I tried this, it executes sucessfully but doesn’t open the BO application or BO report…

Any Suggestions
Thanks
Saravana

 10 pts.