Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] FML RECAP % in Excel

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] FML RECAP % in Excel
 Login/Join
 
Member
posted
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
-RUN

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
<FreSte>
posted
It it's probably not what you want, but if you change the output format to EXL97, it does the formatting (as a temp work-around).

-Fred-
 
Report This Post
Member
posted Hide Post
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.


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
<FreSte>
posted
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
 
Report This Post
Member
posted Hide Post
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.


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
<FreSte>
posted
OK, understood.

There is a way however to do it with less code;
You can put the stylesheet coding in a repeat-loop like:

-REPEAT :LB_STYLE1 FOR &I FROM 2 TO 16;
TYPE=REPORT, LABEL=TOTA, COLUMN=N&I, STYLE=BOLD, $
TYPE=REPORT, LABEL=TOTB, COLUMN=N&I, STYLE=BOLD, $
TYPE=REPORT, LABEL=TOTC, COLUMN=N&I, STYLE=BOLD, $
TYPE=REPORT, LABEL=TOTD, COLUMN=N&I, STYLE=BOLD, $
...
... etc etc
...
-:LB_STYLE1



... 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.

Cheers,

-Fred-
 
Report This Post
Member
posted Hide Post
Fred, that will do it! I had no idea that you could do something like that. Thanks a bunch.


WebFOCUS 7.6.10
Windows
Excel, PDF, HTML
 
Posts: 19 | Location: Cincinnati OH | Registered: August 18, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] FML RECAP % in Excel

Copyright © 1996-2020 Information Builders