We are using BO version 5.02. I am trying to pass prompt values in on the command line when starting BO. I will be call BO object from a Visual Basic program using the “SHELL” command and need a way to pass-in to the BO Report/Document, values for all of the prompts (ie ~ 15- 20 items) and use these values in VBA inside the report. Can this be done? I believe it should look something like this: Shell("“C:\Program Files\Business Objects5\BusinessObjects 5.0\BUSOBJ.EXE” c:\temp\my.rep var1,var2,var3,var4", 1)
I am not aware of a way to do this from a command line. You will probably have to call the Active X component directly from VB and open/refresh the report using VB.
Simon
a) the less sophisticated way
Create a text file containing your variables, with the format: Prompt=Value
Prompt=Value
… etc …
Then execute BO using the command line prompt: -vars filename.txt (See the BO User manual page 609 for all of the command line parameters).
Using the VB Shell command, BO is executed asynchronously - so you have little control or feedback over what happens.
You might also look at:
b) the OLE Automation interface
BO has a fairly rich OLE Automation interface, where your VB code can create a BO object, load the document, create and set variables, refresh the document, print or distribute the output. All this with full support for VB error handling.
There are significant benefits to this approach - have a look at the BO SDK manual (in PDF format on the BO 5 CD in the “\Online Guides” directory.
Kevin Charleston
SA Container Depots
Cape Town, South Africa