[reportlab-users] Table split
   
    Casey Duncan
     
    reportlab-users@reportlab.com
       
    Tue, 15 Oct 2002 15:01:35 -0400
    
    
  
I've been working with some tables and ran into an issue where the table row splitter was failing in a strange way. Basically the Table.split was returning an empty list for some strange reason and after some debugging I found out why:
Here is the split method for platypus Table flowables:
    def split(self, availWidth, availHeight):
        self._calc()
        if self.splitByRow:
            if self._width>availWidth: return []  <-- some strange reason
            return self._splitRows(availHeight)
        else:
            raise NotImplementedError
I marked the suspect line, which seems to be making the split fail if the table is too wide. Commenting out this line corrects the problem, as would fixing my table width I suppose (it is computed dynamically) , but this made no intuitve sense to me.
Why does the width of the table come into play during the row split?
-Casey