[reportlab-users] RE: Large tables and multiple pages

Rüdiger Mähl reportlab-users@reportlab.com
Tue, 10 Sep 2002 12:41:50 +0200


This is a MIME encoded message.
--STEFAN3d7dcc6d56f
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Derek Basch schrieb am 10.09.02 09:36:14:
> Great! I am glad to hear that it can be done
> automagically. An example would be very helpful. There
> is really no Wiki for ReportLab and some of the stuff
> in pretty tough for newbies.=20
> Thanks,
> Derek Basch

Here is the example as attachment.

Regards,=20

R=FCdiger=20


=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F
WEB.DE MyPage - Ohne Computerkenntnisse in nur 5 Minuten online! Alles
inklusive! Kinderleicht!  http://www.das.ist.aber.ne.lustige.sache.ms/
--STEFAN3d7dcc6d56f
Content-Type: text/plain; name="table_example.py"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="table_example.py"
Content-MD5: 1w1cPReoTxVRkNy9Ors/BA==

DQpfX3ZlcnNpb25fXyAgICAgICAgID0gIjEuMC4wIg0KX19wcm9ncmFtbmFtZV9fID0gInRh
YmxlX2V4YW1wbGUucHkiDQoNCg0KaW1wb3J0IG9zDQppbXBvcnQgdGltZQ0KaW1wb3J0IHJh
bmRvbQ0KDQpmcm9tIHJlcG9ydGxhYi5wbGF0eXB1cyBpbXBvcnQgKg0KZnJvbSByZXBvcnRs
YWIubGliLnN0eWxlcyBpbXBvcnQgKg0KZnJvbSByZXBvcnRsYWIucmxfY29uZmlnIGltcG9y
dCBkZWZhdWx0UGFnZVNpemUNCmZyb20gcmVwb3J0bGFiLm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ICAgcmV0dXJuIFRhYmxlU3R5bGUoWyBcDQogICAgICAgICAgICAoJ0ZPTlROQU1FJywgICAo
MCwwKSwgKC0xLDApLCAiVGltZXMtQm9sZCIpLCBcDQogICAgICAgICAgICAoJ0ZPTlRTSVpF
JywgICAoMCwwKSwgKC0xLDApLCAxMCksIFwNCiAgICAgICAgICAgICgnVEVYVENPTE9SJywg
ICgwLDApLCAoLTEsMCksIGNvbG9ycy5taWRuaWdodGJsdWUpLCBcDQogICAgICAgICAgICAo
J0JBQ0tHUk9VTkQnLCAoMCwwKSwgKC0xLDApLCBjb2xvcnMuZ2hvc3R3aGl0ZSksIFwNCiAg
ICAgICAgICAgICgnRk9OVE5BTUUnLCAgICgwLDEpLCAoLTEsLTEpLCAiVGltZXMtUm9tYW4i
KSwgXA0KICAgICAgICAgICAgKCdGT05UU0laRScsICAgKDAsMSksICgtMSwtMSksIDgpLCBc
DQogICAgICAgICAgICAoJ1RFWFRDT0xPUicsICAoMCwxKSwgKC0xLC0xKSwgY29sb3JzLmRh
cmtzbGF0ZWJsdWUpLCBcDQogICAgICAgICAgICAoJ0FMSUdOJywgICAgICAoMSwwKSwgKC0x
LC0xKSwgIlJJR0hUIiksIFwNCiAgICAgICAgICAgICgnVkFMSUdOJywgICAgICgwLDEpLCAo
MCwtMSksICdUT1AnKSwgXA0KICAgICAgICAgICAgKCdWQUxJR04nLCAgICAgKDAsMCksICgt
MSwwKSwgJ0JPVFRPTScpLCBcDQogICAgICAgICAgICAoJ0xFRlRQQURESU5HJywgICgwLDAp
LCAoLTEsLTEpLCAzKSwgXA0KICAgICAgICAgICAgKCdSSUdIVFBBRERJTkcnLCAoMCwwKSwg
KC0xLC0xKSwgMyksIFwNCiAgICAgICAgICAgICgnVE9QUEFERElORycsICAgKDAsMCksICgt
MSwtMSksIDEpLCBcDQogICAgICAgICAgICAoJ0JPVFRPTVBBRERJTkcnLCgwLDApLCAoLTEs
LTEpLCAxKSwgXA0KICAgICAgICAgICAgKCdHUklEJywg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