|
|
|
Re: :blush: how to create display font color is red into the negative value [message #120637 is a reply to message #120387] |
Sat, 21 May 2005 04:25 |
hudo
Messages: 165 Registered: May 2004
|
Senior Member |
|
|
1. Define Visual Attribute RED_BACKGROUND
===========================================
2. POST-QUERY Trigger
======================
DECLARE
BEGIN
IF ( :BONUS.COMM < 0 ) THEN
SET_ITEM_INSTANCE_PROPERTY('BONUS.COMM', CURRENT_RECORD, VISUAL_ATTRIBUTE,'RED_BACKGROUND');
END IF;
-- other example, every third row with different background color
IF ( MOD (TO_NUMBER(:SYSTEM.TRIGGER_RECORD), 3) = 0 ) THEN
SET_ITEM_INSTANCE_PROPERTY('BONUS.COMM', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'DIFF_BACKGROUND');
SET_ITEM_INSTANCE_PROPERTY('BONUS.OTHER_ITEM_OF_BLOCK', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'DIFF_BACKGROUND');
END IF;
END;
|
|
|
|