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     when and stylesheet on defined field
Go
New
Search
Notify
Tools
Reply
  
when and stylesheet on defined field
 Login/Join
 
<Vipul>
posted
I am having problems using when in stylesheet to color the value in a column when it is defined field and I cannot use the real field in the when clause. please see the code attached and help me.


-* File testwhen.fex
DEFINE FILE CAR
DEALERCOST/P17.2CM = IF COUNTRY EQ 'ENGLAND' THEN DEALER_COST ELSE 0;
END
-*
TABLE FILE CAR
SUM DEALER_COST
DEALERCOST
RETAIL_COST
BY MODEL
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='Letter',
LEFTMARGIN=0.250000,
RIGHTMARGIN=0.250000,
TOPMARGIN=0.250000,
BOTTOMMARGIN=0.250000,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
GRID=OFF,
$
TYPE=REPORT,
STYLE=NORMAL,
FONT='ARIAL',
SIZE=8,
BACKCOLOR='NONE',
$
TYPE=DATA,
SIZE=8,
BACKCOLOR=( RGB(255 255 255) RGB(230 230 230) ),
$
TYPE=REPORT,
COLUMN=N1,
WRAP=1.000000,
$
TYPE=REPORT,
COLUMN=N2,
JUSTIFY=LEFT,
WRAP=1.20000,
$
TYPE=DATA,
COLUMN=N2,
COLOR=RED, WHEN= DEALER_COST LE 5000 ,$
$
TYPE=DATA,
COLUMN=N3,
COLOR=RED, WHEN= DEALERCOST LE 5000 ,$
$
TYPE=TITLE,
BACKCOLOR=RGB(000 000 102),
COLOR=RGB(255 255 255),
$
-************************
TYPE=SUBHEAD, SIZE=8, $
ENDSTYLE
END
-RUN
-EXIT
I need the same behaviour on the dealercost field as with dealer_cost. I tried holding the first table request and then using the hold file - doesn't work.

Thanks in Advance,

Vipul

This message has been edited. Last edited by: <Mabel>,
 
Reply With QuoteReport This Post
<Vipul>
posted
I have fixed this problem....I am posting this as this was so simple but totally threw me off. Yes I am a rookie.

Just so you donot make such silly stupid mistakes like I do all the time.

I just have to change the Defined field format from Packed to Decimal. The when condition will not work on packed fields

see: [url]
http://techsupport.informationbuilders.com/ibase/master...create16.htm#1258114
[/url]

Vipul :-)
 
Reply With QuoteReport This Post
<Pietro De Santis>
posted
Vipul,

Don't be hard on yourself. I would say that the fact that WHEN styling won't work with a packed field is a deficiency of the software, not of the programmer!

Pietro.
 
Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     when and stylesheet on defined field

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