Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO RUN VB CODE FROM THE COMMAND LINE

Status
Not open for further replies.

JARE

Technical User
Jul 27, 2000
50
0
0
US
IS THERE A SWITCH FOR RUNNING A MACRO FROM THE
COMMAND LINE IN BO? IF NOT IS THERE ANOTHER
WAY, LIKE AN ON_OPEN EVENT SO MACROS CAN BE
RUN IN BUSINESS OBJECTS USING SCHEDULED TASKS?
 
You cannot call a specific macro from the command line, but you can set the initial macro in the OpenEvent and call the document from the command line:
MS-DOS:
"C:\Program Files\Business Objects\BusinessObjects 5.0\BUSOBJ.EXE" "C:\Program Files\Business Objects\BusinessObjects 5.0\USERDOCS\TEST.REP"

You may also call a ".rea" file.
 
We have a requirement of scheduling the reports using some NT batch script or a VB exe. I understand we could do this without much of a problem. However, are there any obvious limitations of using a command line batch script or a VB exe to schedule the reports? Are these methods reliable? Also, what are the advantages of using a BCA in case we are just going to use it for scheduled refreshing of the reports?

Any ideas in this regard are very much appreciated.

Thanks.
 
I have a scheduled BO task that runs daily on an NT server.
It opens BO, passes in the user id and password, turns off the splash screen etc.

-user USERID -pass PASSWORD -nologo
(put that after the "C:\...BUSOBJ.EXE", and before the "C:\path to your report")

When my report opens, it refreshes, saves, exports, etc, and kicks off a series of other reports and does the same to them.

The big thing with the DOCUMENT_OPEN I found, is that in order to get back into the report to modify it, you have to go in and turn the 'warn me about documents with macros'. And because it has this, you always have to make sure you turn that OFF again or it will just sit there waiting for you to answer it when it goes to run from your scheduler.

For me it's not a big deal. I do have some reports that kick off code when they're openeed as well. (Not scheduled.)Some of our users get confused and panic when it warns them that the document has macros, because of viruses, etc., and end up clicking disable macros... then of course your code doesn't run.

After a user checks don't always ask, and clicks enable macros, they should only get that once. BUT when you make a change to a report, it goes back to asking the macro question before a user can open it. I've tried just changing it in the tools menu, but it seems to store that info at the user level somehow.

Anyone... can he/we get around this?

Good luck.
ainkca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top