The email address should be a clickable mailto link built by creating a plugin within the cell. And Robin's job title should be on a separate line to his name. In the third row, we use the newer and easier table cell properties "href" and "destination". Name Email Robin Becker (chief propellerhead) ("mailto:robin@reportlab.com",) Internal link to back page Hyperlink to www.reportlab.com This should be a 5x5 table where some ranges span. Note that the grid and background commands still work on the "underlying" grid; if you grid the whole table, it will show through your 'spanned cells' This should span the first 3 cells in the top row. It's ordinary left aligned text but could be centred if you want. B C D This should span all five cells in the right column. We vertically centred the text to make it look sensible using a separate stylesheet command.
some more text A B C DB E A B C DB E A B C DB E A B C DB E
This should be a 5x5 table where some ranges span. The column widths have been set as 3cm,10%,10%,10%,30%. The percentage refers to unallocated width only. This should span the first 3 cells in the top row. It's ordinary left aligned text but could be centred if you want. B C D This should span all five cells in the right column. We vertically centred the text to make it look sensible using a separate stylesheet command.





some more text A B C DB E A B C DB E A B C DB E A B C DB E
This shows some pointers on doing financial tables. It demonstrates the decimal alignment and multiple lines. We also used a local <td color="red"> attribute for the negative cell; ideally one wants to make the data drive the colour, so that generator apps don't need to make para tags in every cell if they want red negatives. If we move to dynamic RML, then a number-and-cell-formatting function is possible, but static RML sees everything as text. Note that when the value does not contain the decimal character but there are non-digit characters at the end, it tries to align the rightmost digits with other rows. Corporate Assets Amount Fixed Assets 1,234,567.89 Legal Offense Fund 86,000,000 Company Vehicle 1,234.8901 Petty Cash 42 Intellectual Property Questionable Bank Overdraft (13,029) Goodwill (742,078,231.56) Flat Screen TV 27 inches Net Position Doomed. Really! Individual <td> tags that contain pure strings can override the following attributes: fontName, fontSize, fontColor, leading, leftPadding, rightPadding, topPadding, bottomPadding, background, align, vAlign, lineBelowThickness, lineBelowColor, lineBelowCap, lineBelowCount, lineBelowSpace, lineAboveThickness, lineAboveColor, lineAboveCap, lineAboveCount, lineAboveSpace, lineLeftThickness, lineLeftColor, lineLeftCap, lineLeftCount, lineLeftSpace, lineRightThickness, lineRightColor, lineRightCap, lineRightCount, lineRightSpace . fontName Courier fontName Helvetica fontSize 8 fontSize 14 fontColor red fontColor blue leading leading is 16 leading leading is 12 leftPadding 10 leftPadding 16 rightPadding 10 rightPadding 24 topPadding 10 topPadding 24 bottomPadding 10 bottomPadding 24 background pink background lightblue align left align center align right - vAlign - top - vAlign - middle - vAlign - bottom lineBelow right This table is using <xpre> tags around the contents of the right hand column. fontName Courier fontName Helvetica fontSize 8 fontSize 14 fontColor red fontColor blue leading leading is 16 leading leading is 12 leftPadding 10 leftPadding 16 rightPadding 10 rightPadding 24 topPadding 10 topPadding 24 bottomPadding 10 bottomPadding 24 background pink background lightblue align left align center align right - vAlign - top - vAlign - middle - vAlign - bottom

Bulk Data Support

Very often one wants to get quite a lot of text or numeric data into a table - for example from a database query or imported data file. Quoting all of this correctly as XML and wrapping in in td and tr tags is time and memory consumuing, unquoting and parsing it all back even more so. Therefore, instead of explicitly creating row and cell tags, you can now use a new bulkData tag. This lets you specify a delimiter for fields (default is comma) and for records (default is newline), and rml2pdf will break this up. If you want to avoid having to quote ampersands, wrap this in a CDATA escape sequence. Of course if you want per-cell formatting or to put arbitrary flowables in a cell, you must use the other tags. You can specify a tab with fieldDelim="\t", but we generally advise against using any whitespace character as a delimiter if you have a choice. You can also specify fine-grained "stripping" control; the default behaviour is to strip whitespace off the top and bottom of the overall data block, so blank lines are excluded, and off the ends of each row so line endings and indentation don't matter, but not off each cell. Note that the strings in the cells may contain spaces and these spaces will be respected in formatting. You are also advised to use a CDATA escape sequence around your data so that "&","<" and ">", characters don't need special handling.

Excel Bulk Data Support

The excelData tag is very similar to the bulk data support, but reads the bulk data from an Excel file instead of from delimited textual data. The range attribute is optional.

Sorry Ecel Bulk Support is not yet here

Colour cycles by rows and columns

It's sometimes nice to alternate colours by row (e.g. a pale color then white) to visually break up a long table. The style lets you specify cycles as well as single colours. Here we have created a style command which cycles through pale green and white, like old stacks of fanfold paper... Date Item Debit Credit 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Bottom row should be greem 110 - Try again by column, with three colors this time. Also ensure some row heights vary to check accuracy of drawing. Date Item Debit Credit 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients plus magnum of champagne 400 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - 28-09-2004 Expensive lunch with clients 100 - And now by column (although this may be used less...) Date Item Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Total Expenses Entertainment 100 100 100 100 100 100 100 100 100 100 100 100 1200 Expenses Entertainment 100 100 100 100 100 100 100 100 100 100 100 100 1200 Expenses Entertainment 100 100 100 100 100 100 100 100 100 100 100 100 1200 Expenses Entertainment 100 100 100 100 100 100 100 100 100 100 100 100 1200 Expenses Entertainment 100 100 100 100 100 100 100 100 100 100 100 100 1200

Splitting over pages - top and bottom rows

Sometimes a table splits over a page and you don't have a grid, so the bottom part (and top of the new page) have no line boxing them in. The splitfirst and splilast magic coordinates can be used to insert a line drawing routine into the style for this. I used an ugly thick purple line! DateItemDebitCredit 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100- 28-09-2004Expensive lunch with clients100 -