Index...
Centrallix Documentation
|
report/form
form :: A freeform layout container for displaying query results
Metadata:
type: | report/form |
visual: | yes |
container: | yes |
Overview:
The form provides a way to display query results in a non-tabular fashion. Each individual piece of data has to be manually positioned, requiring more effort but giving more flexibility. The form will essentially iterate through its contents for each record it retrieves from a query.
Forms can have one of three modes: normal, outer, and inner. A 'normal' form simply starts the query, retrieves all of the results from the query (up to the reclimit maximum), iterating over its content once for each record, and then ends the query, discarding any data remaining. An 'outer' form starts the query and then iterates over its content while more results are available, but does not actually retrieve the results itself. An 'inner' form works only (directly or indirectly) inside an 'outer' form, and retrieves records (up to the reclimit maximum) but does not start or end the query.
The typical reason to use 'outer' and 'inner' mode forms is to group query results in chunks of a certain size, perhaps in a part of a multipage preprinted form such as a receipt or invoice. The 'outer' mode form is used to surround the multipage preprinted forms as a whole, and the 'inner' mode form is used to generate the section of the report that contains the list that carries over from page to page but in an area not the size of the entire form (and possibly having other data above and/or below it).
Forms can also be used with multiple queries simultaneously. They support running these queries in one of several fashions: 'nested', 'parallel', and 'multinested'. In the first, 'nested', if two queries were specified, the second query would be run once in its entirety for each record returned from the first - this is identical to nesting multiple forms inside of one another, each referencing only one query.
1,2,3a,b
1a
1b
2a
2b
3a
3b
The second, 'parallel', runs the queries simultaneously and independently of one another - the results are combined together on the output - and continues until no query has more records.
1,2,3a,b
1a
2b
3NULL
The third, 'multinested', is more interesting - here the form iterates once through each query before the nested queries are run, giving each individual record its own unique line.
1,2,3a,b
1NULL
1a
1b
2NULL
2a
2b
3NULL
3a
3b
Usage:
May be used inside any visual container, and may contain any visual component or container, including areas, tables, other forms, and data elements.
Properties:
Property | Type | Description |
ffsep |
yes/no |
Whether to do a page break between successive records. Default 'no'. |
mode |
string |
The mode of the form (see overview). 'normal' is the default. |
multimode |
string |
How the form handles multiple queries (see overview). 'nested' is the default. |
page |
integer |
Sets the starting page number for the form. Used sometimes if the page number has to be reset to 1, as in reports containing a series of multipage parts (such as multi-page invoices). |
reclimit |
integer |
Sets a limit on the number of records the form is to print. |
source |
stringvec |
A list of one or more query(ies) to run for this form. If more than one is specified, use the 'multimode' setting to specify how they are combined. |
Child Properties:
none currently available
Sample Code:
normalForm "report/form"
{
source=myQuery;
ffsep=yes;
//
// query data is printed here with report/data, etc.
//
}
outerForm "report/form"
{
// This inner/outer form pair displays six records per page.
source=myQuery;
mode=outer;
ffsep=yes;
comment "report/data" { value="Here are up to six of the records:\n"; }
innerForm "report/form"
{
source=myQuery;
mode=inner;
reclimit=6;
//
// display query data here with report/data, etc.
//
}
}
Comments...
(none yet)
Add a Comment...
|