URGENT - Setting visual attribute for a particular record [message #86370] |
Sun, 26 September 2004 03:20 |
Ansuya
Messages: 1 Registered: September 2004
|
Junior Member |
|
|
I have designed a form using oracle Developer 6.0 for inventory control.
When I post query I would like to highlight those
particular rows or record having 'no stock'.
How do I set the record property for say foreground
color in case of no stock.This is not the same as item
property.
Please suggest
|
|
|
|
Re: URGENT - Setting visual attribute for a particular record [message #86375 is a reply to message #86370] |
Sun, 26 September 2004 22:17 |
Kanwar M. Abid
Messages: 2 Registered: March 2004
|
Junior Member |
|
|
You can place this code in POST-QUERY Trigger.
here in this example
BLOCK_NAME = Your Block Name
COLUMN_NAME = You Column Name
and you have to create 2 Visual Attribute e.g VA_NO_STOCK for no stock and VA_STOCK for stock.
DECLARE
cur_itm VARCHAR2(80);
cur_block VARCHAR2(80) := :System.Cursor_Block;
BEGIN
cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
WHILE ( cur_itm IS NOT NULL ) LOOP
cur_itm := cur_block||'.'||cur_itm;
IF :BLOCK_NAME.COLUMN_NAME IS NULL then
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
VISUAL_ATTRIBUTE,'VA_NO_STOCK');
ELSE
Set_Item_Instance_Property( cur_itm, CURRENT_RECORD,
VISUAL_ATTRIBUTE,'VA_STOCK');
END IF;
cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
END LOOP;
END;
|
|
|
|