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
thanksThis message has been edited. Last edited by: Kerry,
769 Excel,PDF and HTML
September 04, 2010, 03:24 AM
Dan Satchell
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
September 06, 2010, 06:43 AM
Shru
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
September 06, 2010, 07:07 AM
Tony A
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
September 06, 2010, 08:43 AM
Shru
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
September 07, 2010, 03:20 AM
Shru
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
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
September 10, 2010, 04:30 PM
Kerry
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.
September 12, 2010, 12:19 AM
Senthilvasan S
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