SRW.REFERENCE
built-in procedureThis procedure adds the referenced object to the PL/SQL construct's dependency list. This causes Reports Builder to determine the object's value just before firing the PL/SQL construct. This is useful when you want to ensure that a column value passed to a user exit is the most recently computed or fetched value.
SRW.REFERENCE (:object CHAR|DATE|NUMBER);
Parameters |
Description |
:object |
Is the Reports Builder parameter or column whose value needs to be ascertained before the construct fires. |
The colon is required before the object name.
SRW.REFERENCE
is unnecessary when the object is already referenced
in the current PL/SQL construct.
Suppose you want to pass the temperature and pressure values to a user exit called SUPERHEAT. Suppose, also, that if the temperature is too low, you want to raise a customized error message. To do so, you could write the following formula:
FUNCTION EXIT RETURN BOOLEAN IS
BEGIN
if :temp > 0 then
SRW.REFERENCE (:temp); -- unnecessary reference
SRW.REFERENCE (:pressure);
SRW.USER_EXIT('superheat temp pressure');
else SRW.MESSAGE(1000, 'Temperature is below normal.
Is machine off?');
raise SRW.PROGRAM_ABORT;
end if;
RETURN(TRUE);
END;
About the
Reports Builder built-in package (SRW
)
Copyright © 1984, 2005, Oracle. All rights reserved.