Lire::Report::ColumnInfo3pm
Object that holds column meta-data.
Usage
my $info = $subreport->column_info_by_idx( 0 );print "Column's name: ", $info->name(), "\n";print "Column's index: ", $info->index(), "\n";print "Column's type: ", $info->type(), "\n";print "Column's label: ", $info->label(), "\n";
Overview
The Lire::Report::ColumnInfo object contains meta-data information on the columns of a subreport.
Constructor
new( $group, $name, $class, $type, [$label]])
Creates a new Lire::Report::ColumnInfo object. The column info attributes are initialized based on $name, $class, $type and $label.
Object methods
name()
Returns the name of this column. This name can be used to find the group operation (from the report specification) that is responsible for the column's content.
class()
Returns the column's class of data. This will be either 'numerical' or 'categorical'.
type()
Returns the column's type. This referes to the type of the DLF field that was usd to generate this column's values.
group_info()
Returns the GroupInfo object which contains this column.
index()
Returns the column's index in the table. This will be undef until the column info object is added to a Lire::Subreport or Lire::Group object.
col_start()
Returns the display column which is the start of the cell span that should be used to render this column's values.
col_end()
Returns the display column which is the end of the cell span that should be used to render this column's values.
col_width()
Returns the suggested column width for this column in characters.
max_chars()
This method returns the length of the longest string in that column (including the label).
avg_chars()
This method returns the average length of strings in that column (including the label). This will be round up to the next integer (1.3 -> 2).
label( [$label] )
Returns the column's label. If the $label parameter is defined, the column's label will be set to this new value.
Version
$Id: ColumnInfo.pm,v 1.15 2006/07/23 13:16:31 vanbaal Exp $
Releases
6 releases since Debian 3.1 (Sarge); the text changed 5 times.