Subject: | Extracting data from database and generating LaTeX table |
Date: | Tue, 21 Feb 2012 17:44:03 -0500 |
To: | bug-latex-table [...] rt.cpan.org |
From: | Dan Scott <danieljamesscott [...] gmail.com> |
Hi,
I'm using LaTeX::Table to generate LaTeX tables from data extracted
from a database. I'm using the DBI module to connect to an Oracle
database and run a query. The results are entered into an 'array of
array references' using fetchall_arrayref() which can be processed
using LaTeX::Table.
There seems to be a problem for some of my queries, most are working
fine, and I get nicely formatted LaTeX tables. However, I occasionally
receive the following:
Attribute (data) does not pass the type constraint because: Validation
failed for 'ArrayRef[ArrayRef[Value]]' with value [ [ 5994, 4828,
25.19514, undef ], [ 5995, 4828, 25.85458, 15 ], [ 30325, 24431,
24.61293, 17 ], [ 30326, 24431, 24.64457, undef ], [ 41166, 27109,
28.6202, 18 ], [ 41167, 27109, 28.63751, undef ] ] at
./test_latex_table.pl line 39
I believe that this is due to the null values in the 4th column. These
are returned from DBI set to 'undef' and seem to be causing problems
for LaTeX::Table. Is it possible to fix this without having to loop
through all of the data converting the 'undef's into blank strings or
into text saying '(null)'?
Many thanks,
Dan Scott