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.
When I run this to PDF it works fine. But when I run it to EXL2K the % line loses its formatting. Try running it with commenting out the line "ON TABLE PCHOLD FORMAT EXL2K" or changing it to PDF output.
SET &ECHO=ALL
DEFINE FILE CAR COST/D15 = SALES * DEALER_COST; END
TABLE FILE CAR SUM COST/D10 AS 'Cost'
ACROSS HIGHEST SEATS
FOR COUNTRY 'W GERMANY' LABEL CNE1 OVER 'ITALY' LABEL CNE2 OVER 'ENGLAND' LABEL CNE3 OVER RECAP TOTE = CNE1 + CNE2 + CNE3; AS 'TOTAL EUROPE' OVER RECAP TOTP/D5.2CB% = (CNE1/TOTE) * 100; AS 'W GERMANY % of EUROPE' OVER
'JAPAN' LABEL CNA1 OVER 'TAIWAN' LABEL CNA2 OVER RECAP TOTA = CNA1 + CNA2; AS 'TOTAL ASIA' OVER
RECAP TOTT = TOTE + TOTA; AS 'TOTAL'
ON TABLE SET PAGE NOPAGE
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE * TYPE=REPORT, FONT='Arial', SIZE=8, $ TYPE=ACROSSVALUE, WRAP=1.0, STYLE=BOLD, JUSTIFY=CENTER, $ TYPE=REPORT, LABEL=TOTE, STYLE=BOLD, $ TYPE=REPORT, LABEL=TOTA, STYLE=BOLD, $ TYPE=REPORT, LABEL=TOTP, STYLE=BOLD, $ TYPE=REPORT, LABEL=TOTT, STYLE=BOLD, $ ENDSTYLE END -RUNThis message has been edited. Last edited by: Kerry,
FreSte, thanks for the quick reply. You are right EXL97 will fix THAT problem but it introduces a whole set of new problems. I may have to go that route though if no one has any other ideas.
I gave it another thought and maybe this could be something to consider: Dump the FML-data to a HOLD-file and use that for downloading it to EXL2K (you have to do something with the end-result with the formats of the not-% fields).
-Fred-
DEFINE FILE CAR
COST/D15 = SALES * DEALER_COST;
END
TABLE FILE CAR
SUM
COST/D12.2 AS 'Cost'
ACROSS HIGHEST SEATS
FOR
COUNTRY
'W GERMANY' LABEL CNE1 OVER
'ITALY' LABEL CNE2 OVER
'ENGLAND' LABEL CNE3 OVER
RECAP TOTE = CNE1 + CNE2 + CNE3; AS 'TOTAL EUROPE' OVER
RECAP TOTP/D10.2 = (CNE1/TOTE) * 100; AS 'W GERMANY % of EUROPE' OVER
'JAPAN' LABEL CNA1 OVER
'TAIWAN' LABEL CNA2 OVER
RECAP TOTA = CNA1 + CNA2; AS 'TOTAL ASIA' OVER
RECAP TOTT = TOTE + TOTA; AS 'TOTAL'
ON TABLE HOLD
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
-*?FF HOLD
-*-EXIT
TABLE FILE HOLD
PRINT *
COMPUTE FLAG/A1 =
IF E01 CONTAINS 'TOTAL' OR '%' THEN 'Y' ELSE 'N'; NOPRINT
ON TABLE SET STYLE *
TYPE=REPORT, FONT='Arial', SIZE=8, $
TYPE=ACROSSVALUE, WRAP=1.0, STYLE=BOLD, JUSTIFY=CENTER, $
TYPE=DATA, STYLE=BOLD, WHEN=FLAG EQ 'Y' ,$
ENDSTYLE
ON TABLE SET PAGE NOPAGE
ON TABLE PCHOLD FORMAT EXL2K
END
-RUN
Fred, that destroys all of my formatting. What I can do to make one individual cell have the right formatting of bold, 2 decimal places and the percent sign is add this line: TYPE=REPORT, LABEL=TOTP, COLUMN=N2, STYLE=BOLD, $
The only problem with this idea is that I will need a line of code for N2 through Nx where x is the number of columns. I have 15 columns. I also have about 10 rows like this so I would need 150 (15*10) rows of code to do the workaround unless there is a way to refer to columns N2 through N15 in one line of code.
... or (if possible), give the labels in the FEX also a number, then you can do it with much less code:
-REPEAT :LB_OUTER FOR &I FROM 2 TO 16;
-REPEAT :LB_INNER FOR &J FROM 1 TO 10;
TYPE=REPORT, LABEL=TOT&J, COLUMN=N&I, STYLE=BOLD, $
-:LB_INNER
-:LB_OUTER
But maybe this kind of coding is not applicable for your report.