[reportlab-users] Problem with row&column spanning code not calculating table heights

Andy Robinson reportlab-users@reportlab.com
Wed, 15 Oct 2003 03:26:32 +0100


> Hi
> 
> In reportlab 1.18 we have a problem where the last row of a table has no 
> height - the text appears, but the boxes are all squashed (see the 
> screenshots below for comparison).
> We have tracked this down to some code in platypus/tables.py where the 
> code says to ignore a cell for calculating row height if the cell is 
> part of a span.
> Taking out this code fixes our problem (see the attached patch)
> We have had some related problems with row and column spanning; can 
> anyone comment on this?

I guess what we should say is,
  "ignore cell for row height if part of a span AND IT SPANS MORE 
   THAN ONE ROW"

And the corollary is to ignore cells when calculating width ig
they span more than one column.

I think I was visualizing the opposite case, cells spanning across,
when I put that in.  Our algorithm will definitely not work out
sensible heights if it tries to take account of spanned cells.
Instead, it sizes all the non-spanned ones and works out the 
spanned ones from those.

Will try to patch this better to cover your cases and mine
tomorrow.

Thanks,

Andy