[Koha] Forced LIMIT on reports

Joshua Ferraro jmf at liblime.com
Tue May 6 22:57:14 NZST 2008


On Thu, May 1, 2008 at 11:47 AM, George Adams <g_adams27 at hotmail.com> wrote:
>
>  I was confused why my custom report wasn't showing me what I thought it
> should.  Running the same query in the MySQL command-line gave me 22 rows,
> but the equivalent Koha report only showed 20 rows.  Finally, with some
> MySQL logging and grep'ing, I found this:
>
> /usr/share/koha/lib/C4/Reports.pm
> lines 335-340
>
>     # take this line out when in production
>     if ($format eq 'csv' or $format eq 'tab'){
>         }
>     else {
>         $sql .= " LIMIT 20";
>     }
I'm assuming you're using Koha 3.0. The limit is for screen dumps, and will
prevent your browser from crashing if there were, say, 3 million lines. I 100%
agree there are much better ways to handle that (such as pages). If you download
the report in CSV format it won't place the extra limit on the query.
So for this
version, think of the screen view as a preview of the final report.

Cheers,

-- 
Joshua Ferraro                       SUPPORT FOR OPEN-SOURCE SOFTWARE
CEO                         migration, training, maintenance, support
LibLime                                Featuring Koha Open-Source ILS
jmf at liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS


More information about the Koha mailing list