On Tue, 2009-03-10 at 20:28 -0700, jonwood wrote:

> I'm creating some reports with some SQLite data. One report groups data by
> one column and subtotals each group.
> 
> It's working well but it really doesn't look right when the last item in a
> group is at the bottom of the page and the subtotal is then orphaned on the
> start of the next page. I really need some way to determine if the next row
> starts a new group, and then take steps to keep the current row on the same
> page as my subtotals if it is.
> 
> Is there any way to peak at the next row without losing the current row? Or
> does anyone have any other suggestions for orphan control?

What you want is to fetch the data into memory first, and then process
it later. They way you describe the goal, you'd only have to keep 1
record in memory.

Also, if you're doing reporting and use Perl, have a look at my project,
PDF::ReportWriter, available on CPAN and my website:
http://entropy.homelinux.org/axis/

Dan



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to