Focal Point
How can you tell what server your report ran on?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9971078331

July 11, 2005, 04:16 PM
reFOCUSing
How can you tell what server your report ran on?
Is there any FOCUS code that will tell you want sever your report ran on? If you run '? STYLE' BASEURL will tell you the server name but I don't know how you can get that value into a variable.
July 11, 2005, 04:53 PM
Francis Mariani
Will &FOCEXURL help? The value of that system variable on my laptop is
 /ibi_apps/WFServlet?IBIF_webapp=/ibi_apps&IBIC_server=EDASERV

July 11, 2005, 04:58 PM
reFOCUSing
I wish it did but it does not. I need the 'http://servername/' part of the URL so that I can figure out which server the reports are on.

I don't know if this helps but the reports are being called by a self-server application and fex files are located on the app path.
July 11, 2005, 05:34 PM
mgrackin
Add the following code to the SITE.WFS WebFOCUS Client configuration file:

<SENDVAR>
WEBSERV=&SERVER_NAME
WEBPORT=&SERVER_PORT
<ENDSENDVAR>

The &SERVER_NAME contains the server name to which the report request is sent to. For example, if the URL for your WebFOCUS server is http://me.myself.com/ibi_apps/... then the value of &SERVER_NAME is 'me.myself.com'. The SENDVAR section will make a variable called &WEBSERV on the WebFOCUS Server to be used in report requests. &SERVER_PORT contains the port number which the Web Server is listening on.

I did a search for 'SERVER_NAME' on IBI's Tech Support web site and found this information.

Do a search on the internet for CGI Environment Variables for a list of other variables that you can get at with this technique.
July 11, 2005, 05:36 PM
Francis Mariani
Here's one solution:

In your parameter screen form, you could have a hidden text input called WEBSERVER, and load it with the following JavaScript:

<body onLoad="document.forms[0].WEBSERVER.value = document.location.hostname;">

July 11, 2005, 05:37 PM
mgrackin
FYI, the variable HTTP_HOST will also get you the host name of your server.

<sendvar>
HTTPSERV=&HTTP_HOST
<endsendvar>
July 11, 2005, 05:39 PM
Francis Mariani
Great technique, Mickey.
July 11, 2005, 08:10 PM
reFOCUSing
Sweeeaaat,
Thanks Mickey.
Was trying to set those variables before but I was doing it to the server site.wfs file and nothing was happening. I didn't even think to try it on the client.