AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | PTX | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
The column name returned by a function call or query for column n.
You can reference Nn in REPORT and ROW blocks.
Examples
Example 1: A variable reference for a column name
The name of column 2 is $(N2).
Example 2: Saves the value of a column name for use outside a REPORT block using DTW_ASSIGN
%define col1="" ... %function (DTW_SQL) myfunc() { select * from atable %report { @dtw_assign(col1, N1) %row{ %} %} %} %html(report) { @myfunc() The column name for the first column is $(col1) %}This example shows how you can use this variable outside the REPORT block by using DTW_ASSIGN. For more information, see DTW_ASSIGN.
Example 3: Nn within an HTML table to define column names
%REPORT{ <h2>Product directory</h2> <table border=1 cellpadding=3> <tr><td>$(N1)</td><td>$(N2)</td><td>$(N3)</td> %ROW{ <tr><td>$(V1)</td><td>$(V2)</td><td>$(V3)</td> %} </table> %}