The report Command

The report command is used to interact with report objects. The purpose of report objects is to generate reports in PDF or HTML format from structure data. PDF files can contain a hidden structure-searchable database with the structure and rendered or auxiliary data items.

The format of a report is defined by an XML style file, which describes a record box with arbitrary positioning of data or image fields. These record boxes can be stacked horizontally and vertically on report pages. The XML style file is embedded in PDFs written by report objects, so these files can contain both human-readable and computer-readable data content plus the layout information used to generate the file. It is for example possible to re-render content with a different style file, or use the style file extracted from a template file to render additional documents in exactly the same style.

The unit for describing report object placements are 72 DPI pixels. The are converted and/or scaled to the selected output format.

report create

report create ?attribute value?...

Create a new report object. Additionally, an set of attributes of the object may be defined in the same statement. The settable attributes are the same as in the report set command.

The command returns the handle of the new report object.

report delete

report delete ?handle?...
report delete all

Delete one of more report objects which are identified by their handles. The second variant deletes all currently defined report objects.

Example:

report delete {*}[report list]

This command is equivalent to report delete all .

report get

report get handle attribute

Query an attribute of a report object. The currently supported attributes are:

If database fields have not yet been defined on the report object, querying or setting this attribute instantiates a standard set for a structure (but not reaction) database. Additionally, all properties currently associated with a data display field in the layout are automatically added, so that every visible data value can also be read from the database.

When setting this attribute, every field sublist must contain only between one and three elements. The last two items reported are automatically deduced from the type of data to be stored. If no explicit field name is specified, the field name is copied from the first argument. If no third element is supplied, the database column has no auxiliary SQL attributes, i.e. it is not indexed, may contain multiple entries of the same value, can be NULL , and an attempt will be made to compute its value when a structure or reaction record is written and the ensemble or reaction does not currently hold a value for the property or pseudo-property of the database column.

report list

report list ?pattern?

Return the handles of all currently defined report objects. The handles may optionally be filtered by a standard Tcl string match condition.

report set

report set handle ?attribute value?...

Set attributes of the report object. The attributes are explained in the section on the report get command.

Example:

report set $rhandle stylefile „mystyle.xml“ paper A4 xblocks 2 yblocks #auto \	scale #auto

This is a typical page set-up operation. The PDF or HTML form of the report will contain 2 top-level boxes arranged horizontally, a suitable (as computed from the aspect ratio of the paper) number of vertically stacked blocks, and everything scaled so that either the horizontal or vertical extent of the block stacks, plus the border, just fit onto the selected paper, without overspill.

report subcommands

report subcommands

Return a list of all subcommands of report objects. The command does not have any parameters.