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     [Case Opened] Conditionally Override a Style - Active Report.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Case Opened] Conditionally Override a Style - Active Report.
 Login/Join
 
Master
posted
When I run the following report...
TABLE FILE GGSALES
PRINT   SEQ_NO
        ST
        DOLLARS
COMPUTE FLAG1/A20 = IF SEQ_NO EQ 1 OR 3 THEN 'GREEN' ELSE 'BLUE';
COMPUTE FLAG2/A20 = IF ST EQ 'MA' THEN 'RED' ELSE FLAG1;
-*
IF SEQ_NO LE 4
-*
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET HTMLCSS ON
ON TABLE SET LINES 30
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
 TYPE=DATA, BACKCOLOR = 'GREEN',            WHEN = FLAG1 EQ 'GREEN',$
 TYPE=DATA, BACKCOLOR = 'BLUE',             WHEN = FLAG1 EQ 'BLUE',$
 TYPE=DATA, COLUMN = ST, BACKCOLOR = 'RED', WHEN = FLAG2 EQ 'RED', $
ENDSTYLE
END
-EXIT  

...I see alternating green and blue background colors.

The 'cell' with 'MA' does not have a 'red' background. Although I think I should be able to override the background color.

When I change the FORMAT to HTML, indeed I do see the 'red' background for 'MA'.

Any ideas, on what I am doing wrong, or what I can to to make AHTML behave as nicely as HTML?

This message has been edited. Last edited by: David Briars,




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
This does it
TABLE FILE GGSALES
PRINT   SEQ_NO
        ST
        DOLLARS
COMPUTE FLAG1/A20 = IF SEQ_NO EQ 1 OR 3 THEN 'GREEN' ELSE 'BLUE';
COMPUTE FLAG2/A20 = IF ST EQ 'MA' THEN 'RED' ELSE FLAG1;
-*
-*IF SEQ_NO LE 4
-*
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET HTMLCSS ON
ON TABLE SET LINES 30
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=DATA,
     BACKCOLOR=( 'GREEN' 'BLUE' ),
$
 TYPE=DATA, COLUMN = ST, BACKCOLOR = 'RED', WHEN = FLAG2 EQ 'RED', $
ENDSTYLE
END


With the benefit that every 'MA' is displayed in red background.

And if you invert the color, the color order assignation will be inverted to
     BACKCOLOR=( 'BLUE' 'GREEM' ),

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


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Thanks Martin!

In my case, I am really alternating colors with 'groups' of rows, not every other row, so I cannot use the 'alternating row' StyleSheet syntax.

Here is my scenario, showing the first two rows are green and then the next two rows are blue.

TABLE FILE GGSALES
PRINT   SEQ_NO
        ST
        DOLLARS
COMPUTE FLAG1/A20 = IF SEQ_NO EQ 1 OR 2 THEN 'GREEN' ELSE 'BLUE';
COMPUTE FLAG2/A20 = IF ST EQ 'MA' THEN 'RED' ELSE FLAG1;
-*
IF SEQ_NO LE 4
-*
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET HTMLCSS ON
ON TABLE SET LINES 30
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
 TYPE=DATA, BACKCOLOR = 'GREEN',            WHEN = FLAG1 EQ 'GREEN',$
 TYPE=DATA, BACKCOLOR = 'BLUE',             WHEN = FLAG1 EQ 'BLUE',$
 TYPE=DATA, COLUMN = ST, BACKCOLOR = 'RED', WHEN = FLAG2 EQ 'RED', $
ENDSTYLE
END
-EXIT




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
Huummm...

Able to change font color but not backcolor....

I know that there are several "issue/restrictions" with AHTML styling but can't find it.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Virtuoso
posted Hide Post
Got it !

Have to code every column which is not the best, but it works
TABLE FILE GGSALES
PRINT   SEQ_NO
        ST
        DOLLARS
COMPUTE FLAG1/A20 = IF SEQ_NO EQ 1 OR 2 THEN 'GREEN' ELSE IF SEQ_NO LE 4 THEN 'BLUE' ELSE '';
COMPUTE FLAG2/A20 = IF ST EQ 'MA' THEN 'RED' ELSE FLAG1;
-*
-*IF SEQ_NO LE 4
-*
ON TABLE PCHOLD FORMAT AHTML
ON TABLE SET HTMLCSS ON
ON TABLE SET LINES 30
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
-*
-*     DEFMACRO=LINE12,
-*     MACTYPE=RULE,
-*     WHEN=FLAG1 EQ 'GREEN',
-*$
-*     DEFMACRO=LINE34,
-*     MACTYPE=RULE,
-*     WHEN=FLAG1 EQ 'BLUE',
-*$
-*     DEFMACRO=DSPRED,
-*     MACTYPE=RULE,
-*     WHEN=FLAG2 EQ 'RED',
-*$
-*
-*TYPE=DATA, COLUMN = SEQ_NO,  BACKCOLOR = 'GREEN', MACRO = LINE12, $
-*TYPE=DATA, COLUMN = ST,      BACKCOLOR = 'GREEN', MACRO = LINE12, $
-*TYPE=DATA, COLUMN = DOLLARS, BACKCOLOR = 'GREEN', MACRO = LINE12, $
-*TYPE=DATA, COLUMN = FLAG1,   BACKCOLOR = 'GREEN', MACRO = LINE12, $
-*TYPE=DATA, COLUMN = FLAG2,   BACKCOLOR = 'GREEN', MACRO = LINE12, $
-*
-*TYPE=DATA, COLUMN = SEQ_NO,  BACKCOLOR = 'BLUE',  MACRO = LINE34, $
-*TYPE=DATA, COLUMN = ST,      BACKCOLOR = 'BLUE',  MACRO = LINE34, $
-*TYPE=DATA, COLUMN = DOLLARS, BACKCOLOR = 'BLUE',  MACRO = LINE34, $
-*TYPE=DATA, COLUMN = FLAG1,   BACKCOLOR = 'BLUE',  MACRO = LINE34, $
-*TYPE=DATA, COLUMN = FLAG2,   BACKCOLOR = 'BLUE',  MACRO = LINE34, $
-*
-*TYPE=DATA, COLUMN = ST, BACKCOLOR = 'RED', MACRO = DSPRED, $


TYPE=DATA, COLUMN = SEQ_NO,  BACKCOLOR = 'GREEN', WHEN = FLAG1 EQ 'GREEN',$
TYPE=DATA, COLUMN = ST,      BACKCOLOR = 'GREEN', WHEN = FLAG1 EQ 'GREEN',$
TYPE=DATA, COLUMN = DOLLARS, BACKCOLOR = 'GREEN', WHEN = FLAG1 EQ 'GREEN',$
TYPE=DATA, COLUMN = FLAG1,   BACKCOLOR = 'GREEN', WHEN = FLAG1 EQ 'GREEN',$
TYPE=DATA, COLUMN = FLAG2,   BACKCOLOR = 'GREEN', WHEN = FLAG1 EQ 'GREEN',$

TYPE=DATA, COLUMN = SEQ_NO,  BACKCOLOR = 'BLUE',  WHEN = FLAG1 EQ 'BLUE',$
TYPE=DATA, COLUMN = ST,      BACKCOLOR = 'BLUE',  WHEN = FLAG1 EQ 'BLUE',$
TYPE=DATA, COLUMN = DOLLARS, BACKCOLOR = 'BLUE',  WHEN = FLAG1 EQ 'BLUE',$
TYPE=DATA, COLUMN = FLAG1,   BACKCOLOR = 'BLUE',  WHEN = FLAG1 EQ 'BLUE',$
TYPE=DATA, COLUMN = FLAG2,   BACKCOLOR = 'BLUE',  WHEN = FLAG1 EQ 'BLUE',$

TYPE=DATA, COLUMN = ST, BACKCOLOR = 'RED',WHEN = FLAG2 EQ 'RED',$
ENDSTYLE
END

Personally, I prefer with the "MACRO" coding; less places to changes if the condition change :-)

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


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Thanks again Martin.

Yep, it is funny (apologies to Joe Pesci) that 'font' is respected, but not background color.

Yep(2), we saw we could style every column...hoping to avoid that though.

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
It seems that you won't have choices to code them all... Big Grin


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Master
posted Hide Post
Case opened.
 
Posts: 822 | Registered: April 23, 2003Report 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     [Case Opened] Conditionally Override a Style - Active Report.

Copyright © 1996-2020 Information Builders