ROWDEF

Top  Previous  Next

ROWDEF

 

Syntax

 

1.[rowdef | crowdef] row, rows, options
{ code block }
 
2.rowdef "text | ~regexpr", rowoffset, rows, options
{ code block }
 
3.rowdef "text | ~regexpr", rowoffset, "to-text | ~to-regexpr", to-rowoffset options
{ code block }

 

Syntax 1 defines an absolute row region. rowdef 5,3 for example, would define a row region starting with row 5, and extending 3 rows down (5-7).  If the "crowdef" format is used, then row is the starting row, and rows is the ending row. crowdef 5,7 would define the same region as rowdef 5,3.

 

Syntax 2 defines a region based on a search for a starting row that contains the text or matches the regular expression.  For each text value or regexpr found, the region will begin at the row rowoffset from the point found, and extend for rows rows.  For example, rowdef "Customer total",0,1 will create a region from each row containing "Customer total" (0 offset is that row), and extending for 1 row (just that row).

 

Syntax 3 defines the region based on two searches, one to find the first row, one to find the ending row below the starting row.  In both cases, the row used for the region is adjusted for the offset. rowdef "Customer:",1,"Customer:",-1 would define a region between each occurrence of the text "Customer:".  If just the first string is found, then all rows from there to the last are specified.  If just the last string is found, then all rows from the first through there are specified.  For this reason, be sure that any absolute regions are specified first.

 

Under format 3, if the last string is not found, UnForm will continue that row definition on the page following the first unallocated row at the time this row definition is evaluated on that page.

 

Description

 

Row definitions are used to define sets of rows for which a given group of column definitions would apply.  Each row definition defines a group of rows that will be presented within a single table row (<tr> ... </tr>).  Under any given row definition, place the column definitions (coldef keywords) that will be used to format the rows.

 

For example, an A/R Aging Report might contain a report heading, column headings, one or more customer headings, and, under each customer heading, one or more detail lines.  At the end of the detail lines would be customer totals.  This report would have five row definitions, for each type of row:  report heading, column heading, customer headings, detail lines, and totals.  Each of these types of rows will have its own set of column groups (or in some cases, no column groups at all, allowing simple mono-spaced presentation.)

 

There can be up to 255 row definitions within any rule set.

 

Each row definition can define attributes that will become defaults for the text and cell formatting of all the column definitions.  Additionally, row definitions can define an option called "suppress", which causes UnForm to suppress the display of the row region.  A comma separates each option.

 

Option

How it gets applied

bgcolor=#rgb, bgcolor=color

Cell gets a bgcolor=value attribute to control the background color. The color can be expressed as an #rrggbb hexadecimal value or as a color name supported by the target browser, such as red, blue, white, etc..

blink

Text gets <blink> attribute.

bold

Text gets <b> attribute.

bottom, top, middle

Cell gets "valign=value" attribute to control vertical justification.  The default is "top".

center, left, right

Cell gets "align=value" attribute to control horizontal justification.  The default is "left"

color=#rgb, color=color

Text gets <font color=value> attribute.  The color can be expressed as an #rrggbb hexadecimal value or as a color name supported by the target browser, such as red, blue, white, etc..

font=font

Text gets <font face=font> attribute.  This is supported by several modern browsers, though the font typeface selected may not be available on all browser clients.

hdr=html text

The top of the column gets the html text, followed by a line break <br> tag.  Use this option to replace top of page column headers with "in cell" column headers.

hdron=hdron text

hdroff=hdroff text

hdrtd=hdrtd text

The column header, if defined, gets placed in a cell with <td> attributes specified hdrtd text, and text attributes hdron text and hdroff text.  Be sure to turn off any hdron text HTML tags in hdroff text.

Text gets <i> attribute.

noencode

If this option is present, then the text is not encoded for HTML markup entities.  This should only be used if you know that the text contains valid HTML coding.

otheropt=options

The table cell gets additional attributes not otherwise specified by the other options.

size=n

Text gets <font size=n> attribute.  Sizes range from 1 to 7, with 3 being considered a "normal" size.

suppress

The rows are not displayed.

tr

Each row in the row group gets a <tr> tag, ensuring that column definitions, even if they contain data values of varying height, will remain horizontally contiguous.  If the cells contain only text, this is generally not required, but if some cells contain images, this keyword will likely be required.

underline

Text gets <u> attribute.