Passing Parameters On Command Line

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)

Thanks

Michael Neese


Listserv Archives (BOB member since 2002-06-25)

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


Listserv Archives (BOB member since 2002-06-25)

You must put your variables in a text file and use the - vars option in you command line.

For more information, take a look at the BusinessObjects50EN.pdf , Appendix A at page 609.

I’ve used it in V4 but not yet tested it in V5.

Christophe


Listserv Archives (BOB member since 2002-06-25)

There are 2 ways of doing this:

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


Listserv Archives (BOB member since 2002-06-25)