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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start-Parameters

Status
Not open for further replies.

wrchto

IS-IT--Management
Jan 3, 2001
14
AT
While starting Business Objects I have to fill in my user-id and my password by hand. Is ist possible to start BO on a server with the scheduler by sending this parameters automatically (for example RUN: P:\BUSOBJ.EXE Y:\userdocs\report.rep -user:userid -pwd:xxx). Is it possible to send the parameters without filling it by hand?
 
Yes you can!. Something like this will start a specific report based on the entered username and password from the command line.

busobj c:\myreport.rep -user username -pass password -keyfile keyfilename -nologo

if there is only one security domain or only one bo key file in locdata you can ignore the -keyfile parameter.

Regards,
Sri
 
THANK YOU!!!!!!
That's it.....

But...is it possible to send parameters for the report itself, too? I have a report with a date-parameter. The date is always yesterday (today - 1). Can I send this date in the parameters, too? My wish is to start this report automatically (with -user xxx -pass xxx) and the date, so that the report runs fully automatically without manual inputs.
 
Yes. You can use -vars varfile to pass paramters. However, what you want to do should be done using a pre-built filter that runs for yesterday.

Steve Krandel
BASE Consulting Group
 
Hmmmm, I think, I am too silly....
I try to start a report which brings data for exact one account. Normally I start the report by hand, then the input-box appears, I fill in an account-number, press enter, and then the report is working.
Now I tried this...

P:\BUSOBJ.EXE Y:\iGCM.rep -user XXXXXX -pass XXXXXX -vars AAA -nologo

...where AAA stands for the account-number that I want to get in the selection. But in this case, the report starts, there is no input-box, but the report is not refreshed for account AAA. The result is the same from the last manual start.
 
for vars it has to be filename which contains the variables and the corresponding values and not account no directly in the command line. if you have a hand at BO pdf it should be there in the Appendix section and it is pretty clear.

sri
 
Suppose you have a prompt called AccountNo in your report and you want to pass a value Acct01 to it, create a textfile say a.txt and in that put these

AccountNo='Acct01'

save it. Also when you create the report for the first time go to Tools->Option->Refresh Document When Opening.

Now in your command prompt give

P:\BUSOBJ.EXE Y:\iGCM.rep -user XXXXXX -pass XXXXXX -vars a.txt -nologo

you should see the report refreshed for Acct01.

Hope that gives you a fair idea.

Regards,
Sri

 
Thank you, it works perfectly!!!!
Now I have another question in this way. I do not know, if anyone starts reports with scripts. We do it often.

With your help I am able to start reports from the command-line with variables. But I have script-started reports, too. Is it possible to add parameters in the script?

For example my script:

Public Sub Doit()
Application.ExchangeDomain = "GEOS_Dokument"
Application.ExchangeMode = 1
Application.Documents.Receive ("iGCM")
Application.Documents.Open ("iGCM")
'
Application.Documents.Item("iGCM").Refresh
'
ActiveDocument.ActiveReport.ExportAsPDF ("M:\Bender\BO\iGCM.PDF")
Application.Documents.Item("iGCM").Close (1)
Application.Documents.Item("iGCM_Script").Close (1)
Application.Quit
End Sub

 
I had a look at your script. Now what do you want to do with the script. You want to start the script automatically everytime the report is opened???? Call the function from Document Open method.

Sri
 
No, I start this script from server-scheduler. Then the script fetches the report from the repository (with RECEIVE), so that I have the newest version. Next BO is opened with the report (with OPEN). And then my script starts the report (with REFRESH).
After that the input-request-form is on the screen. But nobody is here to fill it because the server starts the script in overnight-batch. So I want to take the parameters over the script into the report. I think, it must be with the REFRESH-command, but I do not know the syntax and I cannot find anything in the help.
 
Put the parameters in a text file and read that file from your script and pass the appropriate values.

Sridharan
 
Hi Srdharan!

Yes, but that's exactly my problem!!!! HOW??? Do you know the syntax for passing the parameters?

Application.Documents.Item("iGCM").Refresh.......????

I don't know HOW I can pass the parameters in the refresh-command.

Tom
 
In the document refresh event you have to read the values from the file. Now tell me where does the value entered in the input request form go. Does it go to a prompt ??? If that is the case then we can give the prompt some value using SDK. But the real headache here will be how do you find out whether the report is being refreshed thru script or by user. One way would be to get rid of the user form and instead pass values directly thru SDK to the prompts and refresh.

Regards,
Sri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top