Search code examples
pythonreportlabrml

reportlab: setting colspan for td in rml


I can't find any option, that would allow to set colspan for td element in rml. Is that somehow possible?


Solution

  • The normal ReportLab way to do this would be to instead use Platypus and the Table flowable. When you set the style of the Table, you can specify a 'SPAN' command that will bundle any rectangular area of cells into one. You'll find more information on this in the ReportLab User Guide, chapter 7, page 81.

    If you must use RML, I'm inclined to think that colspan is simply not available. It's at least not in the ReportLab RML reference document. Instead I think you are supposed to use blockSpan elements. There's no example given, but you'll find it in the RML manual.