A script-enabled browser is required for this page to function properly.

SRW.REFERENCE built-in procedure

This 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.

Syntax


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.

Restrictions

Example

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; 

See also

About the Reports Builder built-in package (SRW)

SRW built-in package