Question

  Asked: Apr 8 2008   7:12 PM GMT
  Asked by: Suncawy


VB script to open a Business Objects report


VBScript, Business Objects

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 Files\Business Objects\BusinessObjects Enterprise 6\bin\busobj.exe")
WScript.Sleep 5500
objbo.SendKeys"xxxxxx"
objbo.SendKeys"{ENTER}"
f = anobj.Getfile("\\Rmregfile002\users\e716666\Business Objects\prgHospitalClaim.rep")

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



I'm not familiar with the business objects application, I'll need more information on who makes it to research it more, but from looking at the script I don't think it's going to work.

Looks to me like you are executing the Business Objects application and then using sleep and sendkeys to wait and then possibly enter a password. Then you are trying to open the file itself separately with the filesystem object.

While this will work to open the application and would possibly open the file with the scripting object, there would be no communication between the script and the application.

Allow me to take a different approach, if you are only wanting to open the business opjects report--- and assuming that .rep files are associated with the application. Try removing the last line that is erroring and change teh exec path to the actual file you are trying to open and let windows' file associations take over.

Keep me posted, but that should work if I understand your goals correctly.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development.

Looking for relevant Development Whitepapers? Visit the SearchSQLServer.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

Jlees  |   Apr 8 2008  9:12PM GMT

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

 

Suncawy  |   Apr 9 2008  3:23PM GMT

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.