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 am hoping the subject is clear enough but it probably isn't as clear as it could be. So here goes... I have several reports, and associated HTML pages that need to display in different languages based on the end users language preference selection at log in time.
I haven't created any code for this yet but tried scouring FOCAL point for a solution just didn't seem to find one that fit.
So let's just use the CAR file as an example. The master file is stored in US English..thus the fieldnames are in English, so if the end user logs in as an English user - no issue.
TABLE FILE CAR PRINT COUNTRY CAR MODEL END
generates just that..COUNTRY CAR and MODEL
now if the end user logs in and chooses French Canadian as their language preference..the log in HTML screen captures that preferences as a variable &ULANG - the value being 'fr-ca'. This then has to pass to the HTML Page so that the text on the screen, buttons, and drop down lists are all now in French Canadian. And then that variable has to pass to the fex..and that fex has to read another table that says if &ULANG EQ 'fr-ca' then field1 is no longer called COUNTRY it is now called (whatever the french translation is for COUNTRY). The data in the fields themselves don't have to be translated..just the field names. Could I just identify what should appear on the report through the AS capability for each field? If so, how would I get all that to be on the HTML page to start with? Or am I not seeing the trees for the forest?
Thanks!
WendyThis message has been edited. Last edited by: MonkeyP,
release 7.7.03M OS - Linux HTML, PDF, Excel, Delimited files, Graphs, Dashboards, MRE, Report Caster
there is probably a better way to do it, but this is what a coworker of mine did for a report that had to be in French and English. He did this for each field...and then put the &variables in the report.
-SET &En_Fr_Head01=IF &Language EQ 'E' THEN 'Financial Information Report'
- ELSE 'Rapport d' | '''' | 'information financier';
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005
Well, yes that could be a solution..the problem then becomes this. There are 48 available fields to print on the report, and the end user can multi select and reorder the fields as they choose to from a double list control box which passes a parameter of &COL to the fex. So then how to I translate those inbound values. Again, there is probably a really simple solution and I am just not seeing it because I have stared at it for too long.
release 7.7.03M OS - Linux HTML, PDF, Excel, Delimited files, Graphs, Dashboards, MRE, Report Caster
Reading back through the post, I realize I should just lay it all out there so all the details are available because there are multiple questions. I will post it in step by step order Since english isn't the issue let's assume this user is using French Canadian. 1. User logs in and is directed to initial menu screen. Users language preference is captured and stored as a variable &ULANG. 2. User chooses to see the DCC Customer Care report. 3. User is redirected to another HTML screen - which now needs to be in French Canadian based on the &ULANG preference - not sure how to make this happen without coding a seperate HTML page for each language preference 4. User is displayed a double list control box listing 48 available fields. The display needs to be in their language preference so that would be the 'display' but the value passed will be the actual fieldname. The control passes &COL with the operations of 'OR'. The user can also reorder the fields as they desire them to appear on the report. 5. Once the user, clicks the 'Next>>' button the fex is executed. The report needs to display, headings and requested fields, and requested order, in the language preference of 'fr-ca'. 6. We have created a translation table the gives us the values of the field names in all the possible languages we would need. Do I make use of that table, or decode in the called fex? I hope I layed out the navigation and desired results in more detail. Again, any help would be appreciated.
Thanks!
Wendy P.
release 7.7.03M OS - Linux HTML, PDF, Excel, Delimited files, Graphs, Dashboards, MRE, Report Caster
I did something similar to genericize a report. Classic KPI table with KPI name, Num value, and Denom value. Column header was to be KPI name (I think, project wrapped a while ago). Maybe it helps.
DEFINE FILE VW_INDICATORMETRICVALUES_NUMDEM
NUMTEXT_1/A100 = TRIM('T', NUM_TEXT, 100, ' ', 1, 'A100');
DEMTEXT_1/A100 = TRIM('T', DEM_TEXT, 100, ' ', 1, 'A100');
LGA30/A100 = PARAG(100,NUMTEXT_1,'\',30,'A100');
NLINE1/A30 = GETTOK(LGA30,100, 1, '\',30,'A30');
NLINE2/A30 = GETTOK(LGA30,100, 2, '\',30,'A30');
NLINE3/A30 = GETTOK(LGA30,100, 3, '\',30,'A30');
NLINE4/A30 = GETTOK(LGA30,100, 4, '\',30,'A30');
NUMTEXT_OUT/A123V = IF NLINE4 NE '' THEN NLINE1 | ',' | NLINE2 | ',' | NLINE3 | ',' | NLINE4 ELSE IF NLINE3 NE '' THEN NLINE1 | ',' | NLINE2 | ',' | NLINE3 ELSE IF NLINE2 NE '' THEN NLINE1 | ',' | NLINE2 ELSE NLINE1;
DGA30/A100 = PARAG(100,DEMTEXT_1,'\',30,'A100');
DLINE1/A30 = GETTOK(DGA30,100, 1, '\',30,'A30');
DLINE2/A30 = GETTOK(DGA30,100, 2, '\',30,'A30');
DLINE3/A30 = GETTOK(DGA30,100, 3, '\',30,'A30');
DLINE4/A30 = GETTOK(DGA30,100, 4, '\',30,'A30');
DEMTEXT_OUT/A123V = IF DLINE4 NE '' THEN DLINE1 | ',' | DLINE2 | ',' | DLINE3 | ',' | DLINE4 ELSE IF DLINE3 NE '' THEN DLINE1 | ',' | DLINE2 | ',' | DLINE3 ELSE IF DLINE2 NE '' THEN DLINE1 | ',' | DLINE2 ELSE DLINE1;
END
TABLE FILE VW_INDICATORMETRICVALUES_NUMDEM
SUM
MAX.NUMTEXT_OUT AS 'NUMTEXT'
MAX.DEMTEXT_OUT AS 'DEMTEXT'
WHERE &UNITSLINE EQ '&UNIT';
WHERE OrgEntityNo EQ '&ORG';
WHERE IndicatorName EQ '&IND';
WHERE Year EQ &FY;
ON TABLE HOLD AS BT_NUMDEM_NAMES FORMAT ALPHA
END
-RUN
-READ BT_NUMDEM_NAMES &NUMTEXT.A123V. &DEMTEXT.A123V.
-RUN
-SET &NUMTEXT = EDIT(&NUMTEXT, '$$$$$$9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999');
-SET &DEMTEXT = EDIT(&DEMTEXT, '$$$$$$9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999');
.
.
.
.
.
.
.
DEFINE FILE VW_INDICATORMETRICVALUES_NUMDEM
QUARTER/I4 = IF MONTH FROM 10 TO 12 THEN 1
ELSE IF MONTH FROM 1 TO 3 THEN 2
ELSE IF MONTH FROM 4 TO 6 THEN 3
ELSE 4;
QUARTERA/A1 = FTOA(QUARTER, '(I4)', QUARTERA);
FISCALYEAR/I4 = IF QUARTER EQ 1 THEN YEAR + 1 ELSE YEAR;
PRINTMONTH/A2 = EDIT(MONTH, '$$$$$$$$$99');
PRINTYEAR/A4 = EDIT(YEAR, '$$$$$$$9999');
PRINTDATE/A7 = PRINTMONTH | '/' | PRINTYEAR;
RND_PCT/P8 = (NUM_VALUE / DEM_VALUE) * 100;
CNTR/I4 WITH &UNITSLINE = 1;
END
TABLE FILE VW_INDICATORMETRICVALUES_NUMDEM
SUM
NUM_VALUE AS '&NUMTEXT'
DEM_VALUE AS '&DEMTEXT'
COMPUTE RND_PCT/P6% = (C1/C2)*100; AS 'Percent,Compliance'
BY QUARTER RECOMPUTE AS 'Quarter Total' NOPRINT NOSPLIT
BY MONTH NOPRINT
BY PRINTDATE AS ''
WHERE INDICATORNAME EQ '&IND';
WHERE ORGENTITYNO EQ '&ORG';
WHERE &UNITSLINE EQ '&UNIT';
WHERE FISCALYEAR EQ &FY;
HEADING
"Quality Data Metric Reporting - Rollup (&UNIT_DISP)"
"Entity/Facility: &ORGENTITYNAME "
"Unit/Clinic: &UNIT_DISP "
"Measurement: &IND "
"Fiscal Year: &FY "
" "
.
.
.
.
.
.
ENDSTYLE
END
Definitely use your translation table. Based on the language preference selected by the user on the first HTML page, use the table to build your drop downs and to generate your reports. If you use -HTMLFORM to generate your HTML pages, you may be able to populate even the text strings with !IBI.AMP and/or Dialogue Manager variables and avoid having to create separate HTML pages for each language. If the DM command -READFILE is available in your WF release, you can use it to easily populate a bunch of DM variables from a HOLD file with one simple command.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Thanks for the input everyone. It looks like -HTMLFORM is going to be he best answer because of the need to have the double list box populate in the correct language with !IBI.AMP.TITLE# etc etc. Thanks, Dan. I had stared at it for so long, I just couldn't see it.
release 7.7.03M OS - Linux HTML, PDF, Excel, Delimited files, Graphs, Dashboards, MRE, Report Caster