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] Color Coding for Column Total

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Color Coding for Column Total
 Login/Join
 
Silver Member
posted
HI,

I have a report as the format mentioned below


Car Dept1 Dept2 Dept3 Dept4


Car1 1 5 7 8

Car2 3 6 1 2

Car3 2 1 3 4

Color 0 3 -1 0

Total 7 12 11 14


Here the total is the column total excluding the Color column and color is a calculated field. Based on the Color column I want the Total column to be color coded. Example if the color column value is 0 then the Backcolor for Total should be Green else if Color column value is -1 then the backcolor for Total should be yellow.So in the examle above the first cell of the Total column sgould be green the second red...

Any thoughts how this can be achieved


thanks

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


769 Excel,PDF and HTML
 
Posts: 35 | Location: Bangalore | Registered: March 27, 2008Report This Post
Virtuoso
posted Hide Post
Try this:

.
.
ON TABLE SET STYLE *
 TYPE=GRANDTOTAL, BACKCOLOR=GREEN,  WHEN=Color EQ 0, $
 TYPE=GRANDTOTAL, BACKCOLOR=RED,    WHEN=Color EQ 3, $
 TYPE=GRANDTOTAL, BACKCOLOR=YELLOW, WHEN=Color EQ -1, $
 etc.
ENDSTYLE
.
.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Silver Member
posted Hide Post
thanks Dan for replying, but for some strange reason this is not working. I forgot to mention in my prevoius post that Dept1 Dept2... is an across field. Is this the reason for the code not working. Is there a work around i need to do for the across field


769 Excel,PDF and HTML
 
Posts: 35 | Location: Bangalore | Registered: March 27, 2008Report This Post
Expert
posted Hide Post
You say that Color is a calculated field so how are you achieving the layout that you imply? Are you using FML, it could make the difference in how you would attempt this.

Although generally with ACROSS value summarisation you would do something like -
ON TABLE SET STYLE *
 TYPE=GRANDTOTAL(*), BACKCOLOR=GREEN,  WHEN=Color EQ 0, $
 TYPE=GRANDTOTAL(*), BACKCOLOR=RED,    WHEN=Color EQ 3, $
 TYPE=GRANDTOTAL(*), BACKCOLOR=YELLOW, WHEN=Color EQ -1, $
 etc.
ENDSTYLE


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Silver Member
posted Hide Post
hi Tony,

I am calculating the Color field separately and then doing a more with the rest of the report.

I tried your method also but i am still unable to achieve the required results.


769 Excel,PDF and HTML
 
Posts: 35 | Location: Bangalore | Registered: March 27, 2008Report This Post
Silver Member
posted Hide Post
Also i noticed that when i give the condition1 the report works fine. As soon as i give the condition 2 it takes by default condition 2

condition1
 TYPE= GRANDTOTAL,
BACKCOLOR='GREEN',
COLUMN=N2,
WHEN=E01 EQ 'ZCOLOR',
$

condition 2
TYPE= GRANDTOTAL,
-*MACRO=COND0002,
BACKCOLOR='RED',
COLUMN=N2,
WHEN=E01 EQ 'ZCOLOR',

$ 


I also want to know if i can give 2 when conditions for one column.

For example i want

  TYPE=GRANDTOTAL,
BACKCOLOR='GREEN',
COLUMN=N2,
WHEN = E01 EQ 'COLOR',
WHEN = E02 EQ 0
$


769 Excel,PDF and HTML
 
Posts: 35 | Location: Bangalore | Registered: March 27, 2008Report This Post
Expert
posted Hide Post
Hi Shru,

I consulted with our internals and was suggested that it is better that you open a case with Customer Support Services for additional assistance. To open a case, you may either call at 1-800-736-6130, or access online at InfoResponse.

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Member
posted Hide Post
Shru,

Create a flag field in the define with the
DEFINE FILE
FLAG1/I2 = IF CODITION! OR CONDITION2 THEN 0 ELSE
-IF CONDITION1 OR CONDITION3 THEN 1 ELSE 2;
END

-----STULE ------

condition1

TYPE= GRANDTOTAL,
BACKCOLOR='GREEN',
COLUMN=N2,
WHEN=FLAG1 EQ 0,
$

condition 2
TYPE= GRANDTOTAL,
-*MACRO=COND0002,
BACKCOLOR='RED',
COLUMN=N2,
WHEN=FLAG1 EQ 1,
$

condition 3
TYPE= GRANDTOTAL,
-*MACRO=COND0002,
BACKCOLOR='BLUE',
COLUMN=N2,
WHEN=FLAG1 EQ 2,
$

-------STYLE -------


WebFOCUS 7 6 9
Windows XP
HTML, AHTML, PDF, EXCEL
 
Posts: 24 | Registered: April 24, 2009Report This Post
Silver Member
posted Hide Post
Thanks everyone for the reply.

I used SET command to resolve the issue. I read all the data into a variable and then used

 -SET &COL1 = IF &VAR1 EQ 0 THEN 'BACKCOLOR=GREEN' ELSE IF &VAR1 LT 0 THEN 'BACKCOLOR=YELLOW' ELSE 'BACKCOLOR=RED; 


Then in the styling I used
 TYPE= SUBFOOT,OBJECT=FIELD,ITEM=1,COLSPAN=1,&COL1,$  


769 Excel,PDF and HTML
 
Posts: 35 | Location: Bangalore | Registered: March 27, 2008Report 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] Color Coding for Column Total

Copyright © 1996-2020 Information Builders