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     [CLOSED] how to rounded in webfocus is any function

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] how to rounded in webfocus is any function
 Login/Join
 
Gold member
posted
 Col1	col2     Total_Col2%(Col1*100)total of col1
X_seats	34 	43.58% (34*100)78	
Y_seats	20 	25.64% (20*100)78	
Z_seats	24 	30.76% (24*100)78	
Total	78 	100%
---------------------------------
 

[b]sum of col1 fields [/b]
69.22% of sum of (Total_Col2% X & y seats)
74.34% of sum of (Total_Col2% X & Z seats)
56.40% of sum of (Total_Col2% y & Z seats)


I need to Display sum of col1 with combination (X,Y,Z)
how can I display this one,


can anyone give a examples for that plz

can any one give a examples for that 

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 51 | Registered: December 01, 2010Report This Post
Virtuoso
posted Hide Post
Would that not simply be:

100.00% of sum of (Total_Col2% X & Y & Z seats)


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
This is the code i'm generating the O/P for the below code

TABLE FILE CAR
SUM DEALER_COST
PCT.DEALER_COST/D6.2% WITHIN COUNTRY AS 'PERCENT1'
RETAIL_COST
PCT.RETAIL_COST/D6.2% WITHIN COUNTRY AS 'PERCENT2'
BY COUNTRY
BY SEATS
ON TABLE COLUMN-TOTAL
WHERE COUNTRY EQ 'ENGLAND' OR 'ITALY'
ON TABLE HOLD AS TEST
END

TABLE FILE TEST
SUM
DEALER_COST AS '# of Reviews'
PERCENT1 AS '% of total reviews'
RETAIL_COST AS '# of items with reviews'
PERCENT2 AS '% of total items'
ACROSS COUNTRY
BY SEAT AS 'Review Score'
ON TABLE COLUMN-TOTAL AS 'TOTAL'

ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,SQUEEZE=ON, $
TYPE=GRANDTOTAL, STYLE=BOLD, SIZE=8,BORDER=LIGHT,BORDER-COLOR=RGB(225 225 225),$
ENDSTYLE
END

  COUNTRY 
 ENGLAND ITALY 
Review Score # of Reviews % of total reviews # of items with reviews % of total items # of Reviews % of total reviews # of items with reviews % of total items 
2 11,719 30.96% 13,978 30.84% 36,320 88.08% 45,140 88.40% 
4 14,940 39.47% 17,850 39.39% 4,915 11.92% 5,925 11.60% 
5 11,194 29.57% 13,491 29.77% -- -- -- -- 
TOTAL 37,853 100.00% 45,319 100.00% 41,235 100.00% 51,065 100.00% 
  


i need to ENGLAND Display this part below to upper part output report
ENGLAND Summary Reviews Score for (2&4) is 70%
ENGLAND Summary Reviews Score for (2&5) is 61%(60.53% it is rounded to 61%)
ENGLAND Summary Reviews Score for (4&5) is 69%

same as for ITALY also

Like this i need to display upper part
how can I display this Summary part ,

can anyone give a examples for that plz


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 51 | Registered: December 01, 2010Report This Post
Virtuoso
posted Hide Post
The approach below takes advantage of the fact that multiple HTML outputs are stacked in the Browser display. Two reports are created, the first displays the detail data and Totals row. The second report displays the summary lines. Normally the second report would be accomplished via a SUBFOOT or FOOTING in the first report, but the use of ACROSS makes this very difficult. I had to SET STYLEMODE = FIXED in the second report in order to move the summary line for ITALY far enough to the right. Because the spacing is fixed, the length of DEFINEd field SUM_TEXT determines how far to the right the ITALY summary line will display.

SET ASNAMES  = ON
SET NODATA   = ' '
SET HOLDLIST = PRINTONLY
-*
TABLE FILE CAR
 SUM RETAIL_COST AS 'TOT_COUNTRY'
 BY COUNTRY
-*
 SUM
  DEALER_COST
  PCT.DEALER_COST/D6.2% WITHIN COUNTRY AS 'PERCENT1'
  RETAIL_COST
  PCT.RETAIL_COST/D6.2% WITHIN COUNTRY AS 'PERCENT2'
 BY COUNTRY
 BY SEATS
 WHERE COUNTRY EQ 'ENGLAND' OR 'ITALY'
 ON TABLE HOLD AS TEST1
END
-*
TABLE FILE CAR
 SUM RETAIL_COST
 BY COUNTRY
 BY SEATS
 WHERE COUNTRY EQ 'ENGLAND' OR 'ITALY'
 ON TABLE HOLD AS TEST2 FORMAT FOCUS INDEX COUNTRY
END
-*
JOIN CLEAR *
JOIN COUNTRY IN TEST1 TO ALL COUNTRY IN TEST2 AS J1
-*
DEFINE FILE TEST1
 SUM_PCT/F3% = (TEST1.RETAIL_COST + TEST2.RETAIL_COST) / TOT_COUNTRY * 100 ;
END
-*
TABLE FILE TEST1
 LIST
  TEST1.SEATS/I1 AS 'SUM_SEATS1'
  TEST2.SEATS/I1 AS 'SUM_SEATS2'
  SUM_PCT
 BY COUNTRY
 WHERE (TEST1.SEATS LT TEST2.SEATS);
 ON TABLE HOLD AS TEST3
END
-*
TABLE FILE TEST1
 SUM
  DEALER_COST    AS '# of Reviews'
  PERCENT1       AS '% of total reviews'
  RETAIL_COST    AS '# of items with reviews'
  PERCENT2       AS '% of total items'
 BY SEATS        AS 'Review Score'
 ACROSS COUNTRY  AS ''
 ON TABLE COLUMN-TOTAL AS 'TOTAL'
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  UNITS=IN, SQUEEZE=ON, GRID=OFF, $
  TYPE=GRANDTOTAL, STYLE=BOLD, SIZE=8, BORDER=LIGHT, BORDER-COLOR=RGB(225 225 225), $
 ENDSTYLE
END
-*
DEFINE FILE TEST3
 SUM_TEXT/A110 = 'Summary Reviews Score for ' | COUNTRY || (' ' | EDIT(SUM_SEATS1)) || '& ' || EDIT(SUM_SEATS2) ||
                 ' is' || FTOA(SUM_PCT,'(F4S)','A4') || '%';
END
-*
TABLE FILE TEST3
 SUM SUM_TEXT    AS ''
 BY LIST         NOPRINT
 ACROSS COUNTRY  NOPRINT
 ON TABLE SET HTMLCSS ON
 ON TABLE PCHOLD FORMAT HTML
 ON TABLE SET PAGE NOLEAD
 ON TABLE SET STYLEMODE FIXED
 ON TABLE SET ACROSSLINE OFF
 ON TABLE SET STYLE *
  UNITS=IN, FONT='TIMES NEW ROMAN', SIZE=11, SQUEEZE=ON, GRID=OFF, $
 ENDSTYLE
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report 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     [CLOSED] how to rounded in webfocus is any function

Copyright © 1996-2020 Information Builders