1 2 3 4 5 6 7 8 9 10 11
# Describe the report: my $desc = { columns => { data => [ [ 'Number' => 40 ], [ 'Letter' => 40 ], [ 'Text' => 320 ], [ 'Right' => 60 ], ], }, # end columns };
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
my @header = (); for(my $c = 0; $c < $rangecolumns; $c++) { my @row = (); if ($_[2]->headerCget($c, -itemtype) && $_[2]->headerCget($c, -itemtype) eq 'text') { my %entry = ( $_[2]->headerCget($c, -text) => 40); push @row, \%entry; } push @header, \@row; } my $desc = { columns => { data => @header, }, };
Tk::Error: Not an ARRAY reference
1
2
3
4
5
6
7
8
9
10
my $desc = {
columns => {
data => [
[ 'Number' => 40 ],
[ 'Letter' => 40 ],
[ 'Text' => 320 ],
[ 'Right' => 60 ],
],
}, # end columns
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
for(my $c = 0; $c < 9; $c++)
{
my @row = ();
my @entry = ( $c ,40 );
push @row, \@entry;
push @header, \@row;
}
my $desc = {
columns => {
data => \@header,
},
};
Tk::Error: Not a HASH reference
1
2
3
4
5
6
7
8
9
10
11
for(my $c = 0; $c < 9; $c++)
{
my @entry = ( $c, 40 );
push @header, \@entry;
}
my $desc = {
columns => {
data => \@header,
},
};