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

<rw:getValue>

The rw:getValue tag takes the name of a report object, such as a column, system parameter, user parameter, command line keyword, and so on, retrieves its value, formats it as required, and assigns its string value to a new Java variable. The Java variable name corresponds with the value of the id attribute. rw:getValue cannot assign a value to an existing variable.

The variable is only valid from the rw:getValue tag until the end of the immediate enclosing scope. This can, for example, be the body of an enclosing rw:foreach tag.

Syntax

<rw:getValue id="getvalue_id" src="field_name" [formatMask="format_mask"]> 
   [tag body]
</rw:getValue>

Attribute Value

Description

getvalue_id

A unique identifier in the page scope. This is also the name of the new Java variable.

field_name

The name of a Report object, such as column, system parameter, user parameter, command line keyword, and so on.

format_mask

(Optional) The format mask applied to the report object value. It only applies to values of number or date data type.

Example

This example shows rw:getValue inside a rw:foreach tag.

<rw:foreach id="R_G_EMP_NAME_1" src="G_EMP_NAME">
   <tr bgcolor="<rw:seqval ref="bgcolor" op="nextval"/>">
      <td headers="<%= idEmpName %>"> 
        <rw:getValue id="myEmpName" src="EMP_NAME"/><%= myEmpName %></td> 
      <td headers="<%= idEmpId %>"> 
        <rw:field id="F_EMPLOYEE_ID" src="EMPLOYEE_ID"> F_EMPLOYEE_ID </rw:field></td>
      <td headers="<%= idHireDate %>"> 
        <rw:field id="F_HIRE_DATE" src="HIRE_DATE"> F_HIRE_DATE </rw:field></td>
      <td headers="<%= idSalary %>">    
        <rw:field id="F_SALARY" src="SALARY"> F_SALARY </rw:field></td>    
      <td headers="<%= idCommision %>"> 
        <rw:field id="F_COMM_PCT" src="COMMISSION_PCT"> F_COMM_PCT </rw:field></td> 
      <td headers="<%= idManager %>">    
        <rw:field id="F_EMPLOYEE_ID1" src="EMPLOYEE_ID1"> F_EMPLOYEE_ID </rw:field></td>
      <td headers="<%= idTotal %>"> 
        <rw:field id="F_TotalSALARY" src="TotalSALARYPerEMPLOYEE_ID"    
         formatMask="%NNNNN.00"> F_TotalSALARY </rw:field></td>
   </tr>
</rw:foreach>

See also

Oracle Reports JSP tags

About JSP tags

About JavaServer Pages and servlets