[reportlab-users] Table cell too large vertically

Blake McBride blake1024 at gmail.com
Tue Mar 22 14:20:40 EDT 2016


The amount of data varies widely and is user input.  I can't predict the
length.  So, reducing the font won't work.

I tried to ball park the max size and split the data myself onto several
table rows.  That works but is as ugly as can be.  I never know where on
the page the system will be when encountering a row that is too big, so I
don't know how much space I have left.

Having written several report generators over the years, I think the
algorithm should be:

if row is too big for an entire page
    while more text
        print as much as you can on the current page
        reduce text by what was printed
        page break
else if row is too big for the current page (but small enough for a new
page)
    page break
    print row
else
    print row

Other than this fix on the reportlab end, I don't think there is a way for
me to create a decently laid out report in this case.

Thanks.

Blake McBride



On Tue, Mar 22, 2016 at 10:17 AM, Robin Becker <robin at reportlab.com> wrote:

> On 22/03/2016 14:50, Blake McBride wrote:
>
>> Hi,
>>
>> ........
>> and then print the rest of the same row on a new page.  In other words, if
>> the size of a single row exceeds the vertical space on a whole page,
>> reporlab should split the extra large row into multiple pages rather than
>> issue an exception.  The line that causes the error is:
>>
>> Hi Blake,
>
>
> Unfortunately we don't split cells; your only options are to reduce the
> size of the fonts in the problematic cell or use some other method to
> reduce the cell's height.
> --
> Robin Becker
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> https://pairlist2.pair.net/mailman/listinfo/reportlab-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20160322/b525eb57/attachment.html>


More information about the reportlab-users mailing list