Focal Point
Negative Red

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6791062662

January 15, 2008, 04:03 PM
Prarie
Negative Red
Same program...different problem. Make the negative value red. Because the compute is after the across...the WHEN= does not seem to work. Any thoughts on how to fool it?

TABLE FILE CAR
SUM DEALER_COST/D7B
BY SEATS SUBTOTAL
ACROSS CAR
COMPUTE TOT/D7B = (C1 + C3 + C5 + C7 + C9 + C11)/6; AS Average
COMPUTE CW/D14B = TOT - DEALER_COST;
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
GRID=ON,
ORIENTATION=LANDSCAPE,$
TYPE=DATA,COLOR='RED',COLUMN=CW,WHEN=CW LT 0,$
TYPE=DATA,BACKCOLOR='LIME',FIELD=TOT,$
TYPE=DATA,BACKCOLOR='YELLOW',FIELD=CW,$
TYPE=SUBTOTAL,BACKCOLOR='SILVER',$
TYPE=TITLE,
BACKCOLOR='SILVER',$

ENDSTYLE
END


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Prarie

I have done this, but you need to wait till I'm back at the office.

Tomorrow...




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

If you know how many across values you will have you can specify the computed field by it's column position.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
Yep you would think that would work...but no columns postion does not work either.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Frank? Roll Eyes


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
Yes Prarie

I looked it up in my code, but found the same problem
The colors I have in a across report were not on the totals or computed fields, and I remember I have asked this some months ago.

What you can do, is put the intermediate results in a hold file and do the coloring in the next part.
But that only gives you the problem of naming the columns.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

Hi,

The following should work, the only thing is that you already must know the number of the column, in this case C13. This would require an additional step before the final report, I guess, counting the number of cars.

TABLE FILE CAR
SUM DEALER_COST/D7B
BY SEATS SUBTOTAL
ACROSS CAR
COMPUTE TOT/D7B = (C1 + C3 + C5 + C7 + C9 + C11)/6; AS Average
COMPUTE TOT2/D7B = DEALER_COST;
COMPUTE CW/D14B = TOT - DEALER_COST;
ON TABLE SET STYLE *
UNITS=IN, SQUEEZE=ON, GRID=ON, ORIENTATION=LANDSCAPE,$
TYPE=DATA,BACKCOLOR='LIME',FIELD=TOT,$
TYPE=DATA,BACKCOLOR='YELLOW',FIELD=CW,$
TYPE=DATA,COLOR='RED', COLUMN=CW,WHEN=C13 LT 0,$
TYPE=SUBTOTAL,BACKCOLOR='SILVER',$
TYPE=TITLE,
BACKCOLOR='SILVER',$
ENDSTYLE
END
-RUN


Regards,
Mika


WebFOCUS 7.6.x
PMF 5.2.x