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]Styling ACROSS field.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved]Styling ACROSS field.
 Login/Join
 
Platinum Member
posted
Hi,

I am trying to style the ACROSS value based on a condition.
Here is the sample code with CAR file.

  
TABLE FILE CAR
SUM SALES
COMPUTE COL1/I1 = IF COUNTRY EQ 'ENGLAND' THEN 1
ELSE IF COUNTRY EQ 'FRANCE' THEN 2
ELSE IF COUNTRY EQ 'ITALY' THEN 3
ELSE IF COUNTRY EQ 'JAPAN' THEN 4
ELSE IF COUNTRY EQ 'W GERMANY' THEN 5 ELSE 0;NOPRINT
BY CAR
ACROSS COUNTRY 

ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-*INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,$
DEFMACRO=COND1, MACTYPE=RULE, WHEN=COL1 EQ 1, $
DEFMACRO=COND2, MACTYPE=RULE, WHEN=COL1 EQ 2, $
DEFMACRO=COND3, MACTYPE=RULE, WHEN=COL1 EQ 3, $
DEFMACRO=COND4, MACTYPE=RULE, WHEN=COL1 EQ 4, $
DEFMACRO=COND5, MACTYPE=RULE, WHEN=COL1 EQ 5, $
TYPE=ACROSSVALUE, ACROSS=COUNTRY, BACKCOLOR=RGB(150 54 52), MACRO=COND1, $
TYPE=DATA, ACROSS=COUNTRY, BACKCOLOR=RGB(150 54 52), MACRO=COND2, $
ENDSTYLE
END


I am trying to give different BACKCOLOR to the countries which is a ACROSS field.

I tried with TYPE as ACROSSVALUE and DATA since the different countries are value from the field COUNTRY.But no luck.

I found an older post with a similar requirement,but that time (2006) it was not possible.
Here is the link to that post.
http://forums.informationbuild...941025771#4941025771

Appreciate if anyone can help me with this.

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


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
ACROSSTITLE is for the displayed ACROSS title column : in your case the Country

ACROSSVALUE is for the displayed ACROSS columns : in your case the COUNTRY field

You cannot style ACROSSVALUE using a MACRO since it's only one element. So, it can only have one color

ACROSSCOLUMN is the measure (PRINT/SUM) displayed in relation with the BY and ACROSS fields : in your case the SALES

TABLE FILE CAR
SUM SALES AS 'Sales'
    COMPUTE COL1/I1 = IF COUNTRY EQ 'ENGLAND'   THEN 1
     ELSE IF COUNTRY EQ 'FRANCE'    THEN 2
     ELSE IF COUNTRY EQ 'ITALY'     THEN 3
     ELSE IF COUNTRY EQ 'JAPAN'     THEN 4
     ELSE IF COUNTRY EQ 'W GERMANY' THEN 5 ELSE 0; NOPRINT
BY CAR AS 'Car'
ACROSS COUNTRY AS 'Country'

ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
-*INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,$
DEFMACRO=COND1, MACTYPE=RULE, WHEN=COL1 EQ 1, $
DEFMACRO=COND2, MACTYPE=RULE, WHEN=COL1 EQ 2, $
DEFMACRO=COND3, MACTYPE=RULE, WHEN=COL1 EQ 3, $
DEFMACRO=COND4, MACTYPE=RULE, WHEN=COL1 EQ 4, $
DEFMACRO=COND5, MACTYPE=RULE, WHEN=COL1 EQ 5, $
TYPE=DATA, ACROSSCOLUMN=SALES, BACKCOLOR=RGB(150 54 52),    MACRO=COND1, $
TYPE=DATA, ACROSSCOLUMN=SALES, BACKCOLOR=BLUE, COLOR=WHITE, MACRO=COND2, $
ENDSTYLE
END


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
Platinum Member
posted Hide Post
Thanks for pointing out differences.
I am able to give color to the ACROSSCOLUMN.I am using the same way like your code.
But i wanted to give color to different country names alone.
Eg:The cell with the country name 'ENGLAND' in one color and FRANCE in another color.

That is what i am trying to accomplish.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
As I previously stated :

You cannot style ACROSSVALUE values (which is the country name) using a MACRO (or whatever else AFAIK) since it's only one element. So, it can only have one color.


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
Platinum Member
posted Hide Post
@MartinY
ohk.I am little confused with the part "it's only one element".Because the ACROSS field has multiple DATA/values which are different.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report This Post
Virtuoso
posted Hide Post
It's like even if the ACROSSVALUEs seems to be broke by their content (different country's name), it's only one thing which can be styled as a whole not according to individual values displayed.
Each value (country name) cannot be referenced individually in a ACROSSVALUE as you wish AFAIK.


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
Platinum Member
posted Hide Post
Thanks MartinY.


WF8206,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 229 | Location: MI | Registered: September 13, 2017Report 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]Styling ACROSS field.

Copyright © 1996-2020 Information Builders