Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Styling ACROSS field.
Go
New
Search
Notify
Tools
Reply
  
[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,


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport 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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport 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.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport 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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport 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.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport 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.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Thanks MartinY.


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Solved]Styling ACROSS field.

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.