April 30, 2019, 05:45 PM
srajeevan [SOLVED] Styling issue with TYPE=DATA
Hi,
I have a report with few columns and rows and BACKCOLOR is applied to ROWS using the below code.
TYPE=DATA,
BACKCOLOR=( RGB(242 220 219) RGB(230 184 183) ),
WHEN=CITY EQ '1',
$
I also have to apply a different color to the last ROW.
So i have,
TYPE=DATA,
BACKCOLOR=RGB(150 54 52),
WHEN=ROWID EQ 1,
$
ROWID is a compute field which is set to 1 when it is the last row.
But when i run the report i see that the first styling is applied and the styling from the second part is not applied.
Also i noticed that if i mention each column in the second styling as below,the styling from the second part is applied.
TYPE=DATA,
COLUMN=COL_NAME,
BACKCOLOR=RGB(150 54 52),
WHEN=ROWID EQ 1,
$
Is there any workaround to implement this without mentioning the column name.
This message has been edited. Last edited by: FP Mod Chuck , May 01, 2019 10:43 AM May 01, 2019, 01:44 AM
Danny-SRL Try one of the following:
One DATA and two WHEN statements
TYPE=DATA,
BACKCOLOR=( RGB(242 220 219) RGB(230 184 183) ), WHEN=CITY EQ '1', $
BACKCOLOR=RGB(150 54 52), WHEN=ROWID EQ 1, $
Invert the DATA statements
TYPE=DATA,
BACKCOLOR=RGB(150 54 52), WHEN=ROWID EQ 1, $
TYPE=DATA,
BACKCOLOR=( RGB(242 220 219) RGB(230 184 183) ), WHEN=CITY EQ '1', $
Use a loop to create many DATA statements
-REPEAT #PLOOP FOR &I FROM 1 TO 50;
TYPE=DATA, COLUMN=P&I, BACKCOLOR=RGB(150 54 52), WHEN=ROWID EQ 1, $
-#PLOOP
Even if you do not have 50 output fields, it doesn't hurt.
May 01, 2019, 09:19 AM
srajeevan @Danny.
Thanks.Your trick to invert the data statement worked.