SRW.SET_FIELD_NUM
built-in procedureThis procedure sets the value of a number field. This is useful when you want to conditionally change a field's number value.
SRW.SET_FIELD_NUM(objectid, number NUM);
Parameters |
Description |
objectid |
Is always 0. (The object must always set its own attributes.) |
number |
Is the number you want the field to display. |
SRW.SET_FIELD_NUM
is only meaningful in the format trigger of
a field of Datatype NUMBER
. It has no effect when entered in other
places.
Suppose you want to conditionally change the number of a field, based on each employee's salary. In the format trigger for the field, you could type the following:
FUNCTION CHGFIELD RETURN BOOLEAN IS
TMP NUMBER;
BEGIN
if :sal >= 2000 then
tmp := :sal * 1.08;
SRW.SET_FIELD_NUM (0, tmp);
else
SRW.SET_FIELD_NUM (0, '2500');
end if;
RETURN (TRUE);
END;
About the
Reports Builder built-in package (SRW
)
Copyright © 1984, 2005, Oracle. All rights reserved.