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, NOT SOLVED] - STRANGE STYLING ON COMPUTED FIELD AFTER ACROSS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED, NOT SOLVED] - STRANGE STYLING ON COMPUTED FIELD AFTER ACROSS
 Login/Join
 
Gold member
posted
Hi Everybody,

Here is the code of my fex
 
-SET &TOT1 = '' ;
-SET &TOT2 = '' ;
-SET &TOT3 = '' ;
-REPEAT LABEL FOR &I FROM 1 TO &NB
-SET &J = 1 + (( &I - 1 ) * &NBVAL ) ;
-SET &TOT1 = IF &I EQ 1 THEN 'C1' ELSE &TOT1 | ' + C' | &J   ;
-SET &K = &J + 2 ;
-SET &TOT2 = IF &I EQ 1 THEN 'C3' ELSE &TOT2 | ' + C' | &K   ;
-LABEL


DEFINE FILE TMP1
LIBMOIS/A20=DECODE MOIS( 1 Janvier 2 Février 3 Mars 4 Avril 5 Mai 6 Juin 7 Juillet 8 Août 9 Septembre 10 Octobre 11 Novembre 12 Décembre );
LIB1/A30=' ';
LIB2/A3=' ';
LIB3/A50='TOTAL DU NB D''ARRETS';
END

TABLE FILE TMP1
SUM
     NBPA_STREET/D7S AS 'PA street'
     NBPA_AUTRES/D7S AS 'Autres'
     COMPUTE TOTAL_PA/D7S = NBPA_STREET + NBPA_AUTRES; AS 'Total'
     COMPUTE PCT_STREET/D7.2S = NBPA_STREET / TOTAL_PA * 100; AS '% PA Street'
     COMPUTE PCT_AUTRES/D7.2S = NBPA_AUTRES / TOTAL_PA * 100; AS '% Autres'
BY LIB1 AS ''
BY LIB2 AS ''
BY LIB3 AS ''
ACROSS MOIS NOPRINT
ACROSS LIBMOIS AS '' 
     COMPUTE TOT_PA_STREET/D7S = &TOT1; AS 'Tot Street'
     COMPUTE TOT_PA_AUTRES/D7S = &TOT2; AS 'Tot Autres'
     COMPUTE TOT_PA/D7S = &TOT1 + &TOT2; AS 'TOTAL'
     COMPUTE TOT_PCT_STREET/D7.2S = 100 * (TOT_PA_STREET / TOT_PA); AS '% Street'
     COMPUTE TOT_PCT_AUTRES/D7.2S = 100 * (TOT_PA_AUTRES / TOT_PA); AS '% Autres'

ON TABLE SET PAGE-NUM OFF
ON TABLE HOLD AS STAT1 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,SQUEEZE=ON,$
TYPE=REPORT,FONT='TAHOMA',SIZE=10,COLOR='BLACK',BACKCOLOR='NONE',STYLE=BOLD,RIGHTGAP=0.125000,$

TYPE=REPORT,FONT='TAHOMA',SIZE=10,COLOR='BLACK',BACKCOLOR='NONE',STYLE=BOLD,RIGHTGAP=0.125000,$
TYPE=DATA,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),SIZE=8,BACKCOLOR='WHITE',$
TYPE=TITLE,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),SIZE=9,BACKCOLOR=RGB(141 198 63),STYLE=BOLD,JUSTIFY=CENTER,$
TYPE=ACROSSVALUE,BACKCOLOR='NONE',STYLE=BOLD,JUSTIFY=CENTER,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),$

TYPE=DATA,COLUMN=LIB1,BACKCOLOR='BLUE',BORDER-COLOR='BLUE',$

-*TYPE=DATA,COLUMN=LIB2,BACKCOLOR='NONE',BORDER-TOP-COLOR='WHITE',BORDER-BOTTOM-COLOR='WHITE',$
TYPE=TITLE,COLUMN=LIB1,BACKCOLOR='NONE',BORDER-COLOR='WHITE',$
TYPE=TITLE,COLUMN=LIB2,BACKCOLOR='NONE',BORDER-TOP-COLOR='WHITE',BORDER-BOTTOM-COLOR='WHITE',$
ENDSTYLE
END

 


The TYPE=DATA,COLUMN=LIB1,BACKCOLOR='BLUE',BORDER-COLOR='BLUE',$ applies to the field named LIB1 but also to the computed field TOT_PA_STREET.

I tried TYPE=DATA,COLUMN=N1,BACKCOLOR='BLUE',BORDER-COLOR='BLUE',$ (N1 instead of column name), but it has the same effect.

I don't know why - any idea ?
Thanks for help.
Catherine

This message has been edited. Last edited by: Cati - France,


7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Virtuoso
posted Hide Post
So I take it is not turning blue?

Try coloring columns N2 N3 and so on.

I have had problems with coloring Across fields and it's not always the column you think it is.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
I can't explain the problem. I created a test version of your report:
-SET &ECHO=ON;

-SET &TOT1 = 444444;
-SET &TOT2 = 333333;

DEFINE FILE GGSALES
DATEX/A8 = EDIT(DATE);
MOISX/A2 = EDIT(DATEX,'$$$$99$$');
MOIS/I2 = EDIT(MOISX);

NBPA_STREET/D10 = DOLLARS;
NBPA_AUTRES/D10 = BUDDOLLARS;


LIBMOIS/A20=DECODE MOIS( 1 Janvier 2 Février 3 Mars 4 Avril 5 Mai 6 Juin 7 Juillet 8 Août 9 Septembre 10 Octobre 11 Novembre 12 Décembre );
LIB1/A30=' ';
LIB2/A3=' ';
LIB3/A50='TOTAL DU NB D''ARRETS';
END

TABLE FILE GGSALES
SUM
     NBPA_STREET/D7S AS 'PA street'
     NBPA_AUTRES/D7S AS 'Autres'
     COMPUTE TOTAL_PA/D7S = NBPA_STREET + NBPA_AUTRES; AS 'Total'
     COMPUTE PCT_STREET/D7.2S = NBPA_STREET / TOTAL_PA * 100; AS '% PA Street'
     COMPUTE PCT_AUTRES/D7.2S = NBPA_AUTRES / TOTAL_PA * 100; AS '% Autres'
BY LIB1
BY LIB2
BY LIB3
ACROSS MOIS NOPRINT
ACROSS LIBMOIS AS '' 
     COMPUTE TOT_PA_STREET/D7S = &TOT1; AS 'Tot Street'
     COMPUTE TOT_PA_AUTRES/D7S = &TOT2; AS 'Tot Autres'
     COMPUTE TOT_PA/D7S = &TOT1 + &TOT2; AS 'TOTAL'
     COMPUTE TOT_PCT_STREET/D7.2S = 100 * (TOT_PA_STREET / TOT_PA); AS '% Street'
     COMPUTE TOT_PCT_AUTRES/D7.2S = 100 * (TOT_PA_AUTRES / TOT_PA); AS '% Autres'

ON TABLE SET PAGE-NUM OFF
-*ON TABLE HOLD AS STAT1 FORMAT HTMTABLE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,SQUEEZE=ON,$
TYPE=REPORT,FONT='TAHOMA',SIZE=10,COLOR='BLACK',BACKCOLOR='NONE',STYLE=BOLD,RIGHTGAP=0.125000,$
TYPE=DATA,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),SIZE=8,BACKCOLOR='WHITE',$
TYPE=TITLE,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),SIZE=9,BACKCOLOR=RGB(141 198 63),STYLE=BOLD,JUSTIFY=CENTER,$
TYPE=ACROSSVALUE,BACKCOLOR='NONE',STYLE=BOLD,JUSTIFY=CENTER,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),$

TYPE=DATA,COLUMN=LIB1,BACKCOLOR='BLUE',BORDER-COLOR='BLUE',$
TYPE=TITLE,COLUMN=TOT_PA_STREET,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),BACKCOLOR='white', $
TYPE=TITLE,COLUMN=TOT_PCT_AUTRES,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),BACKCOLOR='white', $

-*TYPE=DATA,COLUMN=LIB2,BACKCOLOR='NONE',BORDER-TOP-COLOR='WHITE',BORDER-BOTTOM-COLOR='WHITE',$
TYPE=TITLE,COLUMN=LIB1,BACKCOLOR='NONE',BORDER-COLOR='WHITE',$
TYPE=TITLE,COLUMN=LIB2,BACKCOLOR='NONE',BORDER-TOP-COLOR='WHITE',BORDER-BOTTOM-COLOR='WHITE',$
ENDSTYLE
END
-RUN
I found that if you turn HTMLCSS OFF, the bug does not occur, but you lose other styling. I added two extra styling lines:
TYPE=TITLE,COLUMN=TOT_PA_STREET,...
TYPE=TITLE,COLUMN=TOT_PCT_AUTRES,...
which seems to fix the problem.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
quote:
NBPA_STREET/D7S AS 'PA street'
NBPA_AUTRES/D7S AS 'Autres'
COMPUTE TOTAL_PA/D7S = NBPA_STREET + NBPA_AUTRES; AS 'Total'
COMPUTE PCT_STREET/D7.2S = NBPA_STREET / TOTAL_PA * 100; AS '% PA Street'
COMPUTE PCT_AUTRES/D7.2S = NBPA_AUTRES / TOTAL_PA * 100; AS '% Autres'
BY LIB1 AS ''


BY LIB2 AS ''

 NBPA_STREET/D7S AS 'PA street' = N1
     NBPA_AUTRES/D7S AS 'Autres'= N2
     COMPUTE TOTAL_PA/D7S = NBPA_STREET + NBPA_AUTRES; AS 'Total'= N3
     COMPUTE PCT_STREET/D7.2S = NBPA_STREET / TOTAL_PA * 100; AS '% PA Street'= N3
     COMPUTE PCT_AUTRES/D7.2S = NBPA_AUTRES / TOTAL_PA * 100; AS '% Autres'= N5
BY LIB1 AS '' = N6
BY LIB2 AS ''= N7
BY LIB3 AS ''= N8
ACROSS MOIS NOPRINT = N9+ all across values
ACROSS LIBMOIS AS ''  next number N9 + number
     COMPUTE TOT_PA_STREET/D7S = &TOT1; AS 'Tot Street' N+ Num
     COMPUTE TOT_PA_AUTRES/D7S = &TOT2; AS 'Tot Autres'N+ Num
     COMPUTE TOT_PA/D7S = &TOT1 + &TOT2; AS 'TOTAL'N+ Num
     COMPUTE TOT_PCT_STREET/D7.2S = 100 * (TOT_PA_STREET / TOT_PA); AS '% Street'N+ Num
     COMPUTE TOT_PCT_AUTRES/D7.2S = 100 * (TOT_PA_AUTRES / TOT_PA); AS '% Autres'N+ Num
  

BY LIB3 AS ''
ACROSS MOIS NOPRINT
ACROSS LIBMOIS AS ''
COMPUTE TOT_PA_STREET/D7S = &TOT1; AS 'Tot Street'
COMPUTE TOT_PA_AUTRES/D7S = &TOT2; AS 'Tot Autres'
COMPUTE TOT_PA/D7S = &TOT1 + &TOT2; AS 'TOTAL'
COMPUTE TOT_PCT_STREET/D7.2S = 100 * (TOT_PA_STREET / TOT_PA); AS '% Street'
COMPUTE TOT_PCT_AUTRES/D7.2S = 100 * (TOT_PA_AUTRES / TOT_PA); AS '% Autres'


WebFOCUS 7.6.10
Windows
HTML
 
Posts: 294 | Registered: March 04, 2010Report This Post
Gold member
posted Hide Post
Thanks all for taking time to answer to my question.

I tried your suggestions, had style for the computed fieds and used the column number.
But, I still can't have the backcolor attribute for the computed fields title.

I've modified the francis example as follow , the backcolor is ok for the data, not for the title.
Any other idea ?
Thanks (Merci)
Catherine

  
TABLE FILE GGSALES
SUM
     NBPA_STREET/D7S AS 'PA street'
     NBPA_AUTRES/D7S AS 'Autres'
     COMPUTE TOTAL_PA/D7S = NBPA_STREET + NBPA_AUTRES; AS 'Total'
     COMPUTE PCT_STREET/D7.2S = NBPA_STREET / TOTAL_PA * 100; AS '% PA Street'
     COMPUTE PCT_AUTRES/D7.2S = NBPA_AUTRES / TOTAL_PA * 100; AS '% Autres'
BY LIB1 AS ''
BY LIB2 AS ''
BY LIB3 AS ''
ACROSS MOIS NOPRINT
ACROSS LIBMOIS AS '' 
     COMPUTE TOT_PA_STREET/D7S = &TOT1; AS 'Tot Street'
     COMPUTE TOT_PA_AUTRES/D7S = &TOT2; AS 'Tot Autres'
     COMPUTE TOT_PA/D7S = &TOT1 + &TOT2; AS 'TOTAL'
     COMPUTE TOT_PCT_STREET/D7.2S = 100 * (TOT_PA_STREET / TOT_PA); AS '% Street'
     COMPUTE TOT_PCT_AUTRES/D7.2S = 100 * (TOT_PA_AUTRES / TOT_PA); AS '% Autres'

ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,SQUEEZE=ON,$
TYPE=REPORT,FONT='TAHOMA',SIZE=10,COLOR='BLACK',BACKCOLOR='NONE',STYLE=BOLD,RIGHTGAP=0.125000,$
TYPE=DATA,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),SIZE=8,BACKCOLOR='WHITE',$
TYPE=TITLE,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),SIZE=9,BACKCOLOR=RGB(141 198 63),STYLE=BOLD,JUSTIFY=CENTER,$
TYPE=ACROSSVALUE,BACKCOLOR='NONE',STYLE=BOLD,JUSTIFY=CENTER,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),$

TYPE=DATA,COLUMN=LIB1,BACKCOLOR='NONE',BORDER=OFF,$
TYPE=DATA,COLUMN=LIB2,BACKCOLOR='NONE',BORDER-BOTTOM=OFF,BORDER-TOP=OFF,$
TYPE=TITLE,COLUMN=LIB1,BACKCOLOR='NONE',BORDER=OFF,$
TYPE=TITLE,COLUMN=LIB2,BACKCOLOR='NONE',BORDER-BOTTOM=OFF,BORDER-TOP=OFF,$
TYPE=TITLE,COLUMN=N64,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),BACKCOLOR='GREEN',$
TYPE=TITLE,COLUMN=TOT_PCT_AUTRES,BORDER=LIGHT,BORDER-STYLE=RIDGE,BORDER-COLOR=RGB(0 112 121),BACKCOLOR='GREEN',$
TYPE=DATA,COLUMN=N64,BACKCOLOR='GREEN',$
ENDSTYLE
END



7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....)
OS400 V5R3, V5R4
Windows 2000/2003/2007/2010
 
Posts: 68 | Location: France | Registered: February 27, 2008Report This Post
Virtuoso
posted Hide Post
I played with this problem for quite some time and could not find a solution to the problem as presented. If you open the report in Report Painter, the COMPUTEd columns at the end of the report cannot be formatted in any way - a sign that the StyleSheet parser has no idea how to handle those columns. The code below offers another approach, using ACROSS...RECOMPUTE. Unfortunately, this approach does not work well with more than one ACROSS statement. For this reason, I combined the two ACROSS phrases (MOIS and LIBMOIS) into one.

DEFINE FILE GGSALES
 NBPA_STREET/D10 = DOLLARS ;
 NBPA_AUTRES/D10 = BUDDOLLARS ;
 MOIS/M = DATE ;
 LIBMOIS/A20 = DECODE MOIS ( 1 '01-Janvier'
                             2 '02-Février'
                             3 '03-Mars'
                             4 '04-Avril'
                             5 '05-Mai'
                             6 '06-Juin'
                             7 '07-Juillet'
                             8 '08-Août'
                             9 '09-Septembre'
                            10 '10-Octobre'
                            11 '11-Novembre'
                            12 '12-Décembre' );
 LIB1/A30 = ' ';
 LIB2/A30 = ' ';
 LIB3/A25 = 'TOTAL DU NB D''ARRETS';
END

TABLE FILE GGSALES
 SUM
    NBPA_STREET AS 'PA street'
    NBPA_AUTRES AS 'Autres'
    COMPUTE TOTAL_PA/D10    = NBPA_STREET + NBPA_AUTRES ;    AS 'Total'
    COMPUTE PCT_STREET/D7.2 = NBPA_STREET / TOTAL_PA * 100 ; AS '% PA Street'
    COMPUTE PCT_AUTRES/D7.2 = NBPA_AUTRES / TOTAL_PA * 100 ; AS '% Autres'
 BY LIB1 AS ''
 BY LIB2 AS ''
 BY LIB3 AS ''
 ACROSS LIBMOIS AS '' RECOMPUTE AS 'Grand Totals'
 ON TABLE SET PAGE-NUM OFF
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  UNITS=IN, SQUEEZE=ON, FONT='TAHOMA', SIZE=8, COLOR='BLACK', STYLE=BOLD, RIGHTGAP=0.125000, $
  TYPE=REPORT, BORDER=LIGHT, BORDER-STYLE=RIDGE, BORDER-COLOR=RGB(0 112 121), $
  TYPE=TITLE, SIZE=9, BACKCOLOR=RGB(141 198 63), STYLE=BOLD, JUSTIFY=CENTER, $
  TYPE=ACROSSVALUE, JUSTIFY=CENTER, $
  TYPE=TITLE, COLUMN=LIB1, BACKCOLOR='NONE', BORDER=OFF, $
  TYPE=TITLE, COLUMN=LIB2, BACKCOLOR='NONE', BORDER-BOTTOM=OFF, BORDER-TOP=OFF, $
  TYPE=DATA, COLUMN=LIB1, BACKCOLOR='NONE', BORDER=OFF, $
  TYPE=DATA, COLUMN=LIB2, BACKCOLOR='NONE', BORDER-BOTTOM=OFF, BORDER-TOP=OFF, $
 ENDSTYLE
END


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Virtuoso
posted Hide Post
Continuing from above, use of a SmartDate and the full month name will eliminate the need for the DECODE and will result in properly sorted columns across the months (LIBMOIS). But you will need French language support for the month names to appear in French.

DEFINE FILE GGSALES
 NBPA_STREET/D10 = DOLLARS ;
 NBPA_AUTRES/D10 = BUDDOLLARS ;
 LIBMOIS/Mtr = DATE ;
 LIB1/A30 = ' ';
 LIB2/A30 = ' ';
 LIB3/A25 = 'TOTAL DU NB D''ARRETS';
END

TABLE FILE GGSALES
 SUM
    NBPA_STREET AS 'PA street'
    NBPA_AUTRES AS 'Autres'
    COMPUTE TOTAL_PA/D10    = NBPA_STREET + NBPA_AUTRES ;    AS 'Total'
    COMPUTE PCT_STREET/D7.2 = NBPA_STREET / TOTAL_PA * 100 ; AS '% PA Street'
    COMPUTE PCT_AUTRES/D7.2 = NBPA_AUTRES / TOTAL_PA * 100 ; AS '% Autres'
 BY LIB1 AS ''
 BY LIB2 AS ''
 BY LIB3 AS ''
 ACROSS LIBMOIS AS '' RECOMPUTE AS 'Grand Totals'
 ON TABLE SET PAGE-NUM OFF
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  UNITS=IN, SQUEEZE=ON, FONT='TAHOMA', SIZE=8, COLOR='BLACK', STYLE=BOLD, RIGHTGAP=0.125000, $
  TYPE=REPORT, BORDER=LIGHT, BORDER-STYLE=RIDGE, BORDER-COLOR=RGB(0 112 121), $
  TYPE=TITLE, SIZE=9, BACKCOLOR=RGB(141 198 63), STYLE=BOLD, JUSTIFY=CENTER, $
  TYPE=ACROSSVALUE, JUSTIFY=CENTER, $
  TYPE=TITLE, COLUMN=LIB1, BACKCOLOR='NONE', BORDER=OFF, $
  TYPE=TITLE, COLUMN=LIB2, BACKCOLOR='NONE', BORDER-BOTTOM=OFF, BORDER-TOP=OFF, $
  TYPE=DATA, COLUMN=LIB1, BACKCOLOR='NONE', BORDER=OFF, $
  TYPE=DATA, COLUMN=LIB2, BACKCOLOR='NONE', BORDER-BOTTOM=OFF, BORDER-TOP=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, NOT SOLVED] - STRANGE STYLING ON COMPUTED FIELD AFTER ACROSS

Copyright © 1996-2020 Information Builders