<rw:field>
The rw:field
tag takes as its source any single value source
object in the data model and provides formatting functionality to render the
object in HTML. Examples of these single value source objects are: columns,
user parameters, PL/SQL scripts, functions, command line keywords, and system
parameters.
An rw:field
for a column within a group must be in the body of
the rw:foreach
tag whose src
attribute points to the group to which the column belongs. For each field in
rw:field
it will first be checked whether it belongs to a group
of enclosing rw:foreach
tags, starting
from the inner most rw:foreach
tag.
If that is not the case, a check is done to see if the field is a report-level
field.
Note: A matrix group cannot be referenced by the breakLevel
attribute.
<rw:field id="field_id" src="object_name" [breakLevel="level"]
[breakValue="break_value"] [nullValue="null_value"] [containsHtml="HTML_value"]
[formatMask="format_mask"] [formatTrigger="format_trigger"] [urlEncode="encode_value"] >
[tag body]
</rw:field>
Attribute Value |
Description |
|
A unique identifier in the page scope. |
|
Name of the referenced Reports object, such as a column, system parameter, or command line keyword. |
|
(Optional) The frequency at which the field is to be repeated. It is
the name of the enclosing |
|
(Optional) The string value that is to be used when the field does not
repeat at a specified |
|
(Optional) The value that is to be used when the field's value is null.
The default value is |
|
(Optional) Can be either of the following:
|
|
(Optional) The format mask that is applied to the field value. It only applies to fields with number or date data types. |
|
(Optional) The name of a format trigger program unit. The executing program unit sets the field's attributes in the Reports backend structure. The tag handler will pick up those attributes and convert them to HTML. If format trigger returns false, there will be no output. The format trigger overrides any settings from tag attributes.
|
encode_value |
(Optional) Can be either of the following:
|
This example shows a simple use of a rw:field
tag.
<rw:field id="F_SumSALARYPerReport" src="SumSALARYPerReport">
F_SumSALARYPerReport
</rw:field>
This example shows the use of rw:field
inside a rw:foreach
loop.
<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>
In prior releases, Reports Builder introduced Web links that you can add to
paper-based reports, which become active when you display your paper report
in a Web browser or PDF viewer. For JSP-based Web reports, hyperlinks have to
be created manually, and if the hyperlinks need to substitute data values, the
data values must be provided with the rw:field
tag. For example:
<a href="http://server/path/rwservlet?report=department.jsp&p_deptno=<rw:field
id="F_Deptno" src="Deptno"/>">
<rw:field id="F_Deptno" src="Deptno">10</rw:field>
</a>