Focal Point
[SOLVED]System variables not working in ReportCaster

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

March 15, 2018, 02:29 AM
Rao D
[SOLVED]System variables not working in ReportCaster
Hi All,

I have the below line of code in one of the report and is working perfect in fetching the protocal and the servername when we execute the report from the BI Portal.

However, when scheduled the report in ReportCaster it is returning blank values for the protocal and the servername.

-SET &FOCEXURL = &URL_PROTOCOL ||'://'||&SERVER_NAME ;
-TYPE FOCEXURL &FOCEXURL ;

FYI..

The variables are set in the admin console > custom settings as
SERVER_NAME (pass)
URL_PROTOCOL (pass)

Any help is appreciated.

Thanks,
Rao.

This message has been edited. Last edited by: Rao D,


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio

March 15, 2018, 08:11 AM
MartinY
Take a look to have them set from a fex included in "Administration Console / Application Settings / Client Settings / Universal Profile"

quote:

Universal Profile (IBI_UNIVERSAL_PROFILE)
The following syntax enables you to include code to be executed by the Client and the ReportCaster Distribution Server. This differs from the _site_profile, which is only executed by a Client request.

_universal_profile=command
where:

command
Is any valid Reporting Server syntax.

A _universal_profile should not include any logic or constructs that will execute only on the Client. For example, http header variables should not be included, because they are available to the Client, but not to the ReportCaster Distribution Server.

The universal profile can also be added directly to the drive:\ibi\WebFOCUS82\client\wfc\etc\site.wfs file.



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
March 15, 2018, 10:29 AM
David Briars
The ReportCaster Internal Variable equivalent of &SERVER_NAME is &DSTHOST.

So for code that can run under the ReportCaster Distribution Server or through the WF Client, he have some common code, that looks like the following, to normalize the server name:

-DEFAULTH &SERVER_NAME = 'WF Server Name Missing'
-DEFAULTH &DSTHOST     = 'Missing'
-*
-TYPE WF Report Server Name: &SERVER_NAME
-TYPE ReportCaster Server Name: &DSTHOST
-*
-SET &SERVER_NAME = IF &DSTHOST EQ 'Missing' THEN &SERVER_NAME ELSE &DSTHOST;
  

Take a look at the ReportCaster Variable list to see if there is an equivalent of 'URL_PROTOCOL' if you need that as well.




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
March 15, 2018, 01:45 PM
Rao D
Thanks David!

DSTHOST gave me the computer name and SERVER_NAME gave the DNS name.

I have added a if condition like the below and it worked.
IF &DSTHOST EQ 'ABC' THEN 'http://xyz.com' ....


WebFOCUS - ver8201
[ReportingServers: Windows 64bit;
Client: tomcat and IIS on windows 2012
AppStudio