[reportlab-users] splitByRow

jonas wustrack jonas at reportlab.com
Fri Jan 9 08:31:07 EST 2009


Thanks for pointing this out. This feature has never been implemented
so currently tables can only be split by row.
The documentation is now fixed in the repository.

--
Jonas

On Sat, Jan 3, 2009 at 2:46 AM, Adrian Klaver <aklaver at comcast.net> wrote:

> ReportLab 2.2

> I seem to not understand the splitByRow argument to Table(). If I set it to 0

> for a table that is too tall and wide for the page I get the following

> traceback. If I set it to 1 then the doc fails to build unless the columns

> fit within the page width then the table splits between rows. It seems at

> present tables can only split by row, not by column. This is contrary to what

> the documentation says;

>

> "For very wide tables, they can also split 'by column'. You can choose whether

> tou(sic) want to split down-and-across or across-and-down"

>

> Am I missing something?

>

>

> <type 'exceptions.NotImplementedError'> Traceback (most recent call last)

>

> /home/aklaver/software_projects/production_database/python_code/<ipython

> console> in <module>()

>

> /usr/lib/python2.5/site-packages/reportlab/platypus/doctemplate.py in

> build(self, flowables, onFirstPage, onLaterPages, canvasmaker)

> 985 if onLaterPages is _doNothing and

> hasattr(self,'onLaterPages'):

> 986 self.pageTemplates[1].beforeDrawPage = self.onLaterPages

> --> 987 BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)

> 988

> 989 def progressCB(typ, value):

>

> /usr/lib/python2.5/site-packages/reportlab/platypus/doctemplate.py in

> build(self, flowables, filename, canvasmaker)

> 754 try:

> 755 first = flowables[0]

> --> 756 self.handle_flowable(flowables)

> 757 handled += 1

> 758 except:

>

> /usr/lib/python2.5/site-packages/reportlab/platypus/doctemplate.py in

> handle_flowable(self, flowables)

> 655 if self.allowSplitting:

> 656 # see if this is a splittable thing

> --> 657 S = frame.split(f,canv)

> 658 n = len(S)

> 659 else:

>

> /usr/lib/python2.5/site-packages/reportlab/platypus/frames.py in split(self,

> flowable, canv)

> 196 s = max(s-self._prevASpace,0)

> 197 flowable.canv = canv #some flowables might need this

> --> 198 r = flowable.split(self._aW, y-p-s)

> 199 del flowable.canv

> 200 return r

>

> /usr/lib/python2.5/site-packages/reportlab/platypus/tables.py in split(self,

> availWidth, availHeight)

> 1271 return self._splitRows(availHeight)

> 1272 else:

> -> 1273 raise NotImplementedError

> 1274

> 1275 def draw(self):

>

> <type 'exceptions.NotImplementedError'>:

>

> Thanks,

> --

> Adrian Klaver

> aklaver at comcast.net

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>




--
Jonas


More information about the reportlab-users mailing list