From 6bd935bf93c8322da01db2dc0e0247e7a69b18aa Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 4 Jan 2006 20:41:48 +0000 Subject: [PATCH] protecting against some warnings git-svn-id: svn://svn.open-ils.org/ILS/trunk@2607 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/reporter/clark-kent.pl | 45 +++++++++++++++-------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/Open-ILS/src/reporter/clark-kent.pl b/Open-ILS/src/reporter/clark-kent.pl index fb55b11696..f3a0cbf226 100755 --- a/Open-ILS/src/reporter/clark-kent.pl +++ b/Open-ILS/src/reporter/clark-kent.pl @@ -12,7 +12,7 @@ use JSON; use Data::Dumper; use OpenILS::WWW::Reporter::transforms; use Text::CSV_XS; -use Spreadsheet::WriteExcel; +use Spreadsheet::WriteExcel::Big; use OpenSRF::EX qw/:try/; use OpenSRF::Utils qw/:daemon/; use OpenSRF::Utils::Logger qw/:level/; @@ -348,7 +348,7 @@ sub build_excel { my $r = shift; my $p = JSON->JSON2perl( $r->{stage3}->{params} ); - my $xls = Spreadsheet::WriteExcel->new($file); + my $xls = Spreadsheet::WriteExcel::Big->new($file); my $sheetname = substr($p->{reportname},1,31); $sheetname =~ s/\W/_/gos; @@ -421,33 +421,34 @@ sub build_html { @graphs = ( $$p{html_graph_type} ); } - # Time for a pie chart - if (grep {$_ eq 'pie'} @graphs) { - my $pics = draw_pie($r, $p, $file); - for my $pic (@$pics) { - print $index "$pic->{name}



"; + if ($graphs[0]) { + # Time for a pie chart + if (grep {$_ eq 'pie'} @graphs) { + my $pics = draw_pie($r, $p, $file); + for my $pic (@$pics) { + print $index "$pic->{name}



"; + } } - } - print $index '



'; - # Time for a bar chart - if (grep {$_ eq 'bar'} @graphs) { - my $pics = draw_bars($r, $p, $file); - for my $pic (@$pics) { - print $index "$pic->{name}



"; + print $index '



'; + # Time for a bar chart + if (grep {$_ eq 'bar'} @graphs) { + my $pics = draw_bars($r, $p, $file); + for my $pic (@$pics) { + print $index "$pic->{name}



"; + } } - } - print $index '



'; - # Time for a bar chart - if (grep {$_ eq 'line'} @graphs) { - my $pics = draw_lines($r, $p, $file); - for my $pic (@$pics) { - print $index "$pic->{name}



"; + print $index '



'; + # Time for a bar chart + if (grep {$_ eq 'line'} @graphs) { + my $pics = draw_lines($r, $p, $file); + for my $pic (@$pics) { + print $index "$pic->{name}



"; + } } } - # and that's it! print $index ''; -- 2.43.2