As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have a file containing ISO 4217 Currency Codes, e.g., USD.
In this case I would like to print the Currency Symbol '$' in a HTML report.
I found several Focal Point threads discussing this topic, but none seemed to give a solution.
I also reviewed 'Extended Currency Symbol Display Options', but only four (4) currencies are available.
I found a chart at the Currency Symbols website apparently giving the hexadecimal number for each of the codes.
So I fired up some code, decoding the Currency Code into the hexadecimal number.
-* File CurrCodeSymbol.fex
-*
APP PREPENDPATH IBISAMP
DEFINE FILE GGSALES
-* Create Currency Codes test data.
CURR_CODE/A50 = DECODE SEQ_NO (1 'ALL'
2 'AFN'
3 'ARS'
4 'AWG');
-* Decode Currency Code into a Currency Symbol
CURR_SYMB/A50 = DECODE CURR_CODE ('ALL' '&|#x4c;&|#x65;&|#x6b;'
'AFN' '&|#x60b;'
'ARS' '&|#x24;'
'AWG' '&|#x192;');
END
-*
TABLE FILE GGSALES
PRINT SEQ_NO
CURR_CODE AS 'Currency,Code'
CURR_SYMB AS 'Currency,Symbol'
IF SEQ_NO LE 4
ON TABLE SET STYLE *
INCLUDE = ENInformationBuilders_Light1, $
TYPE=REPORT, SIZE=12,$
TYPE=TITLE, JUSTIFY=CENTER,$
TYPE=DATA, JUSTIFY=CENTER,$
ENDSTYLE
END
Requests for help: * Before I go any further, does anyone have any thoughts on whether I am on the right track or not? * Has anyone created a text file of codes/hex symbol numbers that they can share? * I added the concatenation symbol after the ampersand in each of the numeric character references. I did this, so the WF parser wouldn't see the references as an amper variable. Is there a better way to handle the character reference?This message has been edited. Last edited by: David Briars,
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
David, you mentioned the report is HTML. I would create a file containing the currency code and the HTML decimal code. I would do this by view-source of the Currency Symbols page you posted, then use a smart text editor (e.g. EditPlus) to clean up the table. The code for the required Master is fairly obvious. I would join to this file - it could be a flat file, a FOCUS DB or a DBMS table. I cannot post the edited file here - the html codes translate to currency codes even within code tags. I can send the file to you.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
AFN Afghanistan Afghani &+x60b;
ALL Albania Lek &+x6b;
ARS Argentina Peso &+x24;
AWG Aruba Guilder &+x192;
AUD Australia Dollar &+x24;
AZN Azerbaijan Manat &+x43d;
BSD Bahamas Dollar &+x24;
BBD Barbados Dollar &+x24;
BYR Belarus Ruble &+x2e;
BZD Belize Dollar &+x24;
BMD Bermuda Dollar &+x24;
BOB Bolivia Boliviano &+x62;
BAM Bosnia and Herzegovina Convertible Marka &+x4d;
BWP Botswana Pula &+x50;
BRL Brazil Real &+x24;
BND Brunei Darussalam Dollar &+x24;
BGN Bulgaria Lev &+x432;
KHR Cambodia Riel &+x17db;
CAD Canada Dollar &+x24;
KYD Cayman Dollar &+x24;
CLP Chile Peso &+x24;
CNY China Yuan Renminbi &+xa5;
COP Colombia Peso &+x24;
CRC Costa Rica Colon &+x20a1;
HRK Croatia Kuna &+x6e;
CUP Cuba Peso &+x20b1;
CZK Czech Republic Koruna &+x10d;
DKK Denmark Krone &+x72;
DOP Dominican Republic Peso &+x24;
EGP Egypt Pound &+xa3;
SVC El Salvador Colon &+x24;
EEK Estonia Kroon &+x72;
EUR Euro Member Euro &+x20ac;
FKP Falkland Islands Pound &+xa3;
FJD Fiji Dollar &+x24;
GHC Ghana Cedis &+xa2;
GIP Gibraltar Pound &+xa3;
GTQ Guatemala Quetzal &+x51;
GGP Guernsey Pound &+xa3;
GYD Guyana Dollar &+x24;
HNL Honduras Lempira &+x4c;
HKD Hong Kong Dollar &+x24;
HUF Hungary Forint &+x74;
ISK Iceland Krona &+x72;
INR India Rupee &+x20B9;
IDR Indonesia Rupiah &+x70;
IRR Iran Rial &+xfdfc;
IMP Isle of Man Pound &+xa3;
ILS Israel Shekel &+x20aa;
JMD Jamaica Dollar &+x24;
JPY Japan Yen &+xa5;
JEP Jersey Pound &+xa3;
KZT Kazakhstan Tenge &+x432;
KPW Korea (North) Won &+x20a9;
KRW Korea (South) Won &+x20a9;
KGS Kyrgyzstan Som &+x432;
LAK Laos Kip &+x20ad;
LVL Latvia Lat &+x73;
LBP Lebanon Pound &+xa3;
LRD Liberia Dollar &+x24;
LTL Lithuania Litas &+x74;
MKD Macedonia Denar &+x43d;
MYR Malaysia Ringgit &+x4d;
MUR Mauritius Rupee &+x20a8;
MXN Mexico Peso &+x24;
MNT Mongolia Tughrik &+x20ae;
MZN Mozambique Metical &+x54;
NAD Namibia Dollar &+x24;
NPR Nepal Rupee &+x20a8;
ANG Netherlands Antilles Guilder &+x192;
NZD New Zealand Dollar &+x24;
NIO Nicaragua Cordoba &+x24;
NGN Nigeria Naira &+x20a6;
XCD No flag East Caribbean Dollar &+x24;
NOK Norway Krone &+x72;
OMR Oman Rial &+xfdfc;
PKR Pakistan Rupee &+x20a8;
PAB Panama Balboa &+x2e;
PYG Paraguay Guarani &+x73;
PEN Peru Nuevo Sol &+x2e;
PHP Philippines Peso &+x20b1;
PLN Poland Zloty &+x142;
QAR Qatar Riyal &+xfdfc;
RON Romania New Leu &+x69;
RUB Russia Ruble &+x431;
SHP Saint Helena Pound &+xa3;
SAR Saudi Arabia Riyal &+xfdfc;
RSD Serbia Dinar &+x2e;
SCR Seychelles Rupee &+x20a8;
SGD Singapore Dollar &+x24;
SBD Solomon Islands Dollar &+x24;
SOS Somalia Shilling &+x53;
ZAR South Africa Rand &+x53;
LKR Sri Lanka Rupee &+x20a8;
SRD Suriname Dollar &+x24;
SEK Sweden Krona &+x72;
CHF Switzerland Franc &+x46;
SYP Syria Pound &+xa3;
TWD Taiwan New Dollar &+x24;
THB Thailand Baht &+xe3f;
TTD Trinidad and Tobago Dollar &+x24;
TRL Turkey Lira &+x20a4;
TVD Tuvalu Dollar &+x24;
UAH Ukraine Hryvna &+x20b4;
GBP United Kingdom Pound &+xa3;
USD United States Dollar &+x24;
UYU Uruguay Peso &+x55;
UZS Uzbekistan Som &+x432;
VEF Venezuela Bolivar Fuerte &+x73;
VND Viet Nam Dong &+x20ab;
YER Yemen Rial &+xfdfc;
ZWD Zimbabwe Dollar &+x24;
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
JOINing to the 'currency file' worked like a champ. Definitely has advantages over the DECODE construct.
If I see an issue with how one of the hex values displays, I'll take a look at using a decimal value instead. For us, under IE9, both the hex and decimal displayed the Indian Rupee symbol AOK.