~ubuntu-branches/ubuntu/trusty/z3c.rml/trusty

« back to all changes in this revision

Viewing changes to src/z3c/rml/tests/input/rml-examples-008-tables.rml

  • Committer: Bazaar Package Importer
  • Author(s): Gediminas Paulauskas
  • Date: 2011-01-05 22:34:45 UTC
  • Revision ID: james.westby@ubuntu.com-20110105223445-wkcn61jbbuqid38s
Tags: upstream-0.9.1
ImportĀ upstreamĀ versionĀ 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1" standalone="no" ?> 
 
2
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
 
3
<document filename="test_008_tables.pdf">
 
4
        <template pageSize="(595, 842)" leftMargin="72" showBoundary="1">
 
5
                <pageTemplate id="main">
 
6
                        <frame id="first" x1="1in" y1="1in" width="6.27in" height="9.69in"/>
 
7
                </pageTemplate>
 
8
        </template>
 
9
        <stylesheet>
 
10
                <blockTableStyle id="temp001">
 
11
                        <blockAlignment value="left"/>
 
12
                        <blockFont name="Helvetica-Oblique"/>
 
13
                        <lineStyle kind="GRID" colorName="black"/>
 
14
                        <lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
 
15
                        <blockBackground colorName="pink" start="0,0" stop="-1,0"/>
 
16
                        <blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
 
17
                </blockTableStyle>
 
18
                <blockTableStyle id="span001">
 
19
                        <blockAlignment value="center"/>
 
20
                        <blockValign value="middle" start="-1,0" stop="-1,-1"/>
 
21
                        <blockSpan start="0,0" stop="2,0"/>
 
22
                        <blockSpan start="-1,0" stop="-1,-1"/>
 
23
                        <lineStyle kind="GRID" colorName="black" start="0,1" stop="-2,-1"/>
 
24
                        <lineStyle kind="GRID" colorName="black" start="3,0" stop="3,0"/>
 
25
                        <lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
 
26
                </blockTableStyle>
 
27
                <blockTableStyle id="numeric">
 
28
                        <!--top row - centre and bold, easy-->
 
29
                        <blockFont name="Times-Bold" start="0,0" stop="-1,0"/>
 
30
                        <blockAlignment value="center" start="0,0" stop="-1,0"/>
 
31
                        <lineStyle kind="LINEABOVE" colorName="purple" start="0,0" stop="-1,0"/>
 
32
                        <lineStyle kind="LINEBELOW" colorName="purple" start="0,0" stop="-1,0"/>
 
33
                        <!--numeric region - decimal align and set right padding-->
 
34
                        <blockAlignment value="right" start="1,1" stop="-1,-1"/>
 
35
                        <!--bottom row - double underline-->
 
36
                        <blockFont name="Times-Bold" start="0,-1" stop="-1,-1"/>
 
37
                        <lineStyle kind="LINEABOVE" colorName="purple" start="0,-1" stop="-1,-1"/>
 
38
                        <lineStyle kind="LINEBELOW" colorName="purple" start="0,-1" stop="-1,-1" count="2"/>
 
39
                </blockTableStyle>
 
40
        </stylesheet>
 
41
        <story>
 
42
                <para>The email address should be a clickable mailto link built by creating a plugin within the cell.  And Robin's job title
 
43
        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".</para>
 
44
                <spacer length="24"/>
 
45
                <blockTable colWidths="5cm,5cm" style="temp001">
 
46
                        <tr>
 
47
                                <td>Name</td>
 
48
                                <td>Email</td>
 
49
                        </tr>
 
50
                        <tr>
 
51
                                <td>Robin Becker
 
52
(chief propellerhead)</td>
 
53
                                <td>
 
54
                                        <plugInFlowable module="mymodule" function="linkURL">("mailto:robin@reportlab.com",)</plugInFlowable>
 
55
                                </td>
 
56
                        </tr>
 
57
                        <tr>
 
58
                                <td destination="BACK_PAGE">Internal link to back page</td>
 
59
                                <td href="http://www.reportlab.com/">Hyperlink to www.reportlab.com</td>
 
60
 
 
61
                        </tr>
 
62
                </blockTable>
 
63
                <spacer length="24"/>
 
64
                <para>This should be a 5x5 table where some ranges span.  Note that the grid and background
 
65
        commands still work on the "underlying" grid; if you grid the whole table, it will show through
 
66
        your 'spanned cells' </para>
 
67
                <spacer length="12"/>
 
68
                <blockTable colWidths="3cm,3cm,3cm,3cm,3cm" rowHeights="1cm,1cm,1cm,1cm,1cm" style="span001">
 
69
                        <tr>
 
70
                                <td>
 
71
                                        <para>This should span the first 3 cells in the top row. It's ordinary left aligned
 
72
                text but could be centred if you want.</para>
 
73
                                </td>
 
74
                                <td>B</td>
 
75
                                <td>C</td>
 
76
                                <td>D</td>
 
77
                                <td>
 
78
                                        <para>This should span all five cells in the right column.  We vertically centred the
 
79
                text to make it look sensible using a separate stylesheet command.</para>
 
80
                                        <hr spaceBefore="5"/>
 
81
                                        <para>some more text</para>
 
82
                                </td>
 
83
                        </tr>
 
84
                        <tr>
 
85
                                <td>A</td>
 
86
                                <td>B</td>
 
87
                                <td>C</td>
 
88
                                <td>DB</td>
 
89
                                <td>E</td>
 
90
                        </tr>
 
91
                        <tr>
 
92
                                <td>A</td>
 
93
                                <td>B</td>
 
94
                                <td>C</td>
 
95
                                <td>DB</td>
 
96
                                <td>E</td>
 
97
                        </tr>
 
98
                        <tr>
 
99
                                <td>A</td>
 
100
                                <td>B</td>
 
101
                                <td>C</td>
 
102
                                <td>DB</td>
 
103
                                <td>E</td>
 
104
                        </tr>
 
105
                        <tr>
 
106
                                <td>A</td>
 
107
                                <td>B</td>
 
108
                                <td>C</td>
 
109
                                <td>DB</td>
 
110
                                <td>E</td>
 
111
                        </tr>
 
112
                </blockTable>
 
113
                <spacer length="24"/>
 
114
                <para>This should be a 5x5 table where some ranges span. The column widths have been set as
 
115
                3cm,10%,10%,10%,30%. The percentage refers to unallocated width only.
 
116
        </para>
 
117
                <spacer length="12"/>
 
118
                <blockTable colWidths="3cm,10%,10%,10%,30%" rowHeights="2cm,1cm,1cm,1cm,None" style="span001">
 
119
                        <tr>
 
120
                                <td vAlign="middle">
 
121
                                        <para>This should span the first 3 cells in the top row. It's ordinary left aligned
 
122
                text but could be centred if you want.</para>
 
123
                                </td>
 
124
                                <td>B</td>
 
125
                                <td>C</td>
 
126
                                <td>D</td>
 
127
                                <td leftPadding="0" rightPadding="0">
 
128
                                        <para>This should span all five cells in the right column.  We vertically centred the
 
129
                text to make it look sensible using a separate stylesheet command.</para>
 
130
                                        <hr spaceBefore="1" width="100%" thickness="1.5" color="pink"/>
 
131
                                        <hr spaceBefore="1" width="100%" thickness="1.5" color="pink" lineCap="butt"/>
 
132
                                        <hr spaceBefore="1" width="100%" thickness="1.5" color="pink" lineCap="square"/>
 
133
                                        <hr spaceBefore="1" width="50%" thickness="1.5" color="pink" lineCap="square" align="right"/>
 
134
                                        <hr spaceBefore="1" width="50%" thickness="1.5" color="pink" lineCap="square" align="left"/>
 
135
                                        <hr spaceBefore="1" width="50%" thickness="1.5" color="pink" lineCap="square" align="centre"/>
 
136
                                        <para>some more text</para>
 
137
                                </td>
 
138
                        </tr>
 
139
                        <tr>
 
140
                                <td>A</td>
 
141
                                <td>B</td>
 
142
                                <td>C</td>
 
143
                                <td>DB</td>
 
144
                                <td>E</td>
 
145
                        </tr>
 
146
                        <tr>
 
147
                                <td>A</td>
 
148
                                <td>B</td>
 
149
                                <td>C</td>
 
150
                                <td>DB</td>
 
151
                                <td>E</td>
 
152
                        </tr>
 
153
                        <tr>
 
154
                                <td>A</td>
 
155
                                <td>B</td>
 
156
                                <td>C</td>
 
157
                                <td>DB</td>
 
158
                                <td>E</td>
 
159
                        </tr>
 
160
                        <tr>
 
161
                                <td>A</td>
 
162
                                <td>B</td>
 
163
                                <td>C</td>
 
164
                                <td>DB</td>
 
165
                                <td>E</td>
 
166
                        </tr>
 
167
                </blockTable>
 
168
                <spacer length="24"/>
 
169
                <nextPage/>
 
170
                <bookmark name="PAGE_TWO"/>
 
171
                <para>This shows some pointers on doing financial tables.  It demonstrates the decimal alignment and
 
172
        multiple lines.  We also used a local &lt;td color="red"&gt; attribute for the negative cell; ideally one wants to make the data drive the colour, 
 
173
        so that generator apps don't need to make para tags in every cell if they want red negatives.
 
174
        If we move to dynamic RML, then a number-and-cell-formatting function is possible, but static RML
 
175
        sees everything as text.
 
176
        
 
177
        Note that when the value does not contain the decimal character but there are non-digit characters at the
 
178
        end, it tries to align the rightmost digits with other rows.
 
179
        </para>
 
180
                <spacer length="12"/>
 
181
                <blockTable colWidths="8cm,4cm">
 
182
                        <blockTableStyle id="temp003">
 
183
                                <!--top row - centre and bold, easy-->
 
184
                                <blockFont name="Times-Bold" start="0,0" stop="-1,0"/>
 
185
                                <blockAlignment value="center" start="0,0" stop="-1,0"/>
 
186
                                <lineStyle kind="LINEABOVE" colorName="purple" start="0,0" stop="-1,0"/>
 
187
                                <lineStyle kind="LINEBELOW" colorName="purple" start="0,0" stop="-1,0"/>
 
188
                                <!--numeric region - decimal align and set right padding-->
 
189
                                <blockAlignment value="decimal" start="1,1" stop="-1,-1"/>
 
190
                                <blockRightPadding length="1.5cm" start="1,1" stop="-1,-1"/>
 
191
                                <blockTextColor colorName="red" start="1,-2" stop="1,-2"/>
 
192
                                <!--bottom row - double underline-->
 
193
                                <blockFont name="Times-Bold" start="0,-1" stop="-1,-1"/>
 
194
                                <lineStyle kind="LINEABOVE" colorName="purple" start="0,-1" stop="-1,-1"/>
 
195
                                <lineStyle kind="LINEBELOW" colorName="purple" start="0,-1" stop="-1,-1" count="2"/>
 
196
                        </blockTableStyle>
 
197
                        <tr>
 
198
                                <td>Corporate Assets</td>
 
199
                                <td>Amount</td>
 
200
                        </tr>
 
201
                        <tr>
 
202
                                <td>Fixed Assets</td>
 
203
                                <td>1,234,567.89</td>
 
204
                        </tr>
 
205
                        <tr>
 
206
                                <td>Legal Offense Fund</td>
 
207
                                <td>86,000,000</td>
 
208
                        </tr>
 
209
                        <tr>
 
210
                                <td>Company Vehicle</td>
 
211
                                <td>1,234.8901</td>
 
212
                        </tr>
 
213
                        <tr>
 
214
                                <td>Petty Cash</td>
 
215
                                <td>42</td>
 
216
                        </tr>
 
217
                        <tr>
 
218
                                <td>Intellectual Property</td>
 
219
                                <td>Questionable</td>
 
220
                        </tr>
 
221
                        <tr>
 
222
                                <td>Bank Overdraft</td>
 
223
                                <td fontColor="red">(13,029)</td>
 
224
                        </tr>
 
225
                        <tr>
 
226
                                <td>Goodwill</td>
 
227
                                <td fontColor="red">(742,078,231.56)</td>
 
228
                        </tr>
 
229
                        <tr>
 
230
                                <td>Flat Screen TV</td>
 
231
                                <td fontColor="red">27 inches</td>
 
232
                        </tr>
 
233
                        <tr>
 
234
                                <td>Net Position</td>
 
235
                                <td>Doomed. Really!</td>
 
236
                        </tr>
 
237
                </blockTable>
 
238
                <nextFrame/>
 
239
                <para>Individual &lt;td&gt; tags that contain pure strings can override the following attributes:
 
240
        <font face="Courier-Bold" size="9">fontName, fontSize, fontColor, leading, leftPadding, rightPadding, 
 
241
                        topPadding, bottomPadding, background, align, vAlign,
 
242
                        lineBelowThickness, lineBelowColor, lineBelowCap, lineBelowCount, lineBelowSpace,
 
243
                        lineAboveThickness, lineAboveColor, lineAboveCap, lineAboveCount, lineAboveSpace,
 
244
                        lineLeftThickness, lineLeftColor, lineLeftCap, lineLeftCount, lineLeftSpace,
 
245
                        lineRightThickness, lineRightColor, lineRightCap, lineRightCount, lineRightSpace
 
246
</font>.</para>
 
247
                <spacer length="24"/>
 
248
                <blockTable colWidths="5cm,5cm" style="temp001">
 
249
                        <tr>
 
250
                                <td>fontName</td>
 
251
                                <td fontName="Courier">Courier</td>
 
252
                        </tr>
 
253
                        <tr>
 
254
                                <td>fontName</td>
 
255
                                <td fontName="Helvetica">Helvetica</td>
 
256
                        </tr>
 
257
                        <tr>
 
258
                                <td>fontSize</td>
 
259
                                <td fontSize="8">8</td>
 
260
                        </tr>
 
261
                        <tr>
 
262
                                <td>fontSize</td>
 
263
                                <td fontSize="14">14</td>
 
264
                        </tr>
 
265
                        <tr>
 
266
                                <td>fontColor</td>
 
267
                                <td fontColor="red">red</td>
 
268
                        </tr>
 
269
                        <tr>
 
270
                                <td>fontColor</td>
 
271
                                <td fontColor="blue">blue</td>
 
272
                        </tr>
 
273
                        <tr>
 
274
                                <td>leading</td>
 
275
                                <td leading="16">leading
 
276
is
 
277
16</td>
 
278
                        </tr>
 
279
                        <tr>
 
280
                                <td>leading</td>
 
281
                                <td leading="12">leading
 
282
is
 
283
12</td>
 
284
                        </tr>
 
285
                        <tr>
 
286
                                <td>leftPadding</td>
 
287
                                <td leftPadding="10">10</td>
 
288
                        </tr>
 
289
                        <tr>
 
290
                                <td>leftPadding</td>
 
291
                                <td leftPadding="16">16</td>
 
292
                        </tr>
 
293
                        <tr>
 
294
                                <td>rightPadding</td>
 
295
                                <td rightPadding="10" align="right">10</td>
 
296
                        </tr>
 
297
                        <tr>
 
298
                                <td>rightPadding</td>
 
299
                                <td rightPadding="24" align="right">24</td>
 
300
                        </tr>
 
301
                        <tr>
 
302
                                <td>topPadding</td>
 
303
                                <td topPadding="10">10</td>
 
304
                        </tr>
 
305
                        <tr>
 
306
                                <td>topPadding</td>
 
307
                                <td topPadding="24">24</td>
 
308
                        </tr>
 
309
                        <tr>
 
310
                                <td>bottomPadding</td>
 
311
                                <td bottomPadding="10">10</td>
 
312
                        </tr>
 
313
                        <tr>
 
314
                                <td>bottomPadding</td>
 
315
                                <td bottomPadding="24">24</td>
 
316
                        </tr>
 
317
                        <tr>
 
318
                                <td>background</td>
 
319
                                <td background="pink">pink</td>
 
320
                        </tr>
 
321
                        <tr>
 
322
                                <td>background</td>
 
323
                                <td background="lightblue">lightblue</td>
 
324
                        </tr>
 
325
                        <tr>
 
326
                                <td>align</td>
 
327
                                <td align="left">left</td>
 
328
                        </tr>
 
329
                        <tr>
 
330
                                <td>align</td>
 
331
                                <td align="center">center</td>
 
332
                        </tr>
 
333
                        <tr>
 
334
                                <td>align</td>
 
335
                                <td align="right">right</td>
 
336
                        </tr>
 
337
                        <tr>
 
338
                                <td>-
 
339
vAlign
 
340
-</td>
 
341
                                <td vAlign="top">top</td>
 
342
                        </tr>
 
343
                        <tr>
 
344
                                <td>-
 
345
vAlign
 
346
-</td>
 
347
                                <td vAlign="middle">middle</td>
 
348
                        </tr>
 
349
                        <tr>
 
350
                                <td>-
 
351
vAlign
 
352
-</td>
 
353
                                <td vAlign="bottom">bottom</td>
 
354
                        </tr>
 
355
                        <tr>
 
356
                                <td>lineBelow</td>
 
357
                                <td lineBelowThickness="1" lineBelowColor="red">right</td>
 
358
                        </tr>
 
359
                </blockTable>
 
360
                <nextFrame/>
 
361
                <para>This table is using <b>&lt;xpre&gt;</b> tags around the contents of the right hand column.</para>
 
362
                <spacer length="24"/>
 
363
                <blockTable colWidths="5cm,5cm" style="temp001">
 
364
                        <tr>
 
365
                                <td>fontName</td>
 
366
                                <td fontName="Courier">
 
367
                                        <xpre>Courier</xpre>
 
368
                                </td>
 
369
                        </tr>
 
370
                        <tr>
 
371
                                <td>fontName</td>
 
372
                                <td fontName="Helvetica">
 
373
                                        <xpre>Helvetica</xpre>
 
374
                                </td>
 
375
                        </tr>
 
376
                        <tr>
 
377
                                <td>fontSize</td>
 
378
                                <td fontSize="8">
 
379
                                        <xpre>8</xpre>
 
380
                                </td>
 
381
                        </tr>
 
382
                        <tr>
 
383
                                <td>fontSize</td>
 
384
                                <td fontSize="14">
 
385
                                        <xpre>14</xpre>
 
386
                                </td>
 
387
                        </tr>
 
388
                        <tr>
 
389
                                <td>fontColor</td>
 
390
                                <td fontColor="red">
 
391
                                        <xpre>red</xpre>
 
392
                                </td>
 
393
                        </tr>
 
394
                        <tr>
 
395
                                <td>fontColor</td>
 
396
                                <td fontColor="blue">
 
397
                                        <xpre>blue</xpre>
 
398
                                </td>
 
399
                        </tr>
 
400
                        <tr>
 
401
                                <td>leading</td>
 
402
                                <td leading="16">
 
403
                                        <xpre>leading
 
404
is
 
405
16</xpre>
 
406
                                </td>
 
407
                        </tr>
 
408
                        <tr>
 
409
                                <td>leading</td>
 
410
                                <td leading="12">
 
411
                                        <xpre>leading
 
412
is
 
413
12</xpre>
 
414
                                </td>
 
415
                        </tr>
 
416
                        <tr>
 
417
                                <td>leftPadding</td>
 
418
                                <td leftPadding="10">
 
419
                                        <xpre>10</xpre>
 
420
                                </td>
 
421
                        </tr>
 
422
                        <tr>
 
423
                                <td>leftPadding</td>
 
424
                                <td leftPadding="16">
 
425
                                        <xpre>16</xpre>
 
426
                                </td>
 
427
                        </tr>
 
428
                        <tr>
 
429
                                <td>rightPadding</td>
 
430
                                <td rightPadding="10" align="right">
 
431
                                        <xpre>10</xpre>
 
432
                                </td>
 
433
                        </tr>
 
434
                        <tr>
 
435
                                <td>rightPadding</td>
 
436
                                <td rightPadding="24" align="right">
 
437
                                        <xpre>24</xpre>
 
438
                                </td>
 
439
                        </tr>
 
440
                        <tr>
 
441
                                <td>topPadding</td>
 
442
                                <td topPadding="10">
 
443
                                        <xpre>10</xpre>
 
444
                                </td>
 
445
                        </tr>
 
446
                        <tr>
 
447
                                <td>topPadding</td>
 
448
                                <td topPadding="24">
 
449
                                        <xpre>24</xpre>
 
450
                                </td>
 
451
                        </tr>
 
452
                        <tr>
 
453
                                <td>bottomPadding</td>
 
454
                                <td bottomPadding="10">
 
455
                                        <xpre>10</xpre>
 
456
                                </td>
 
457
                        </tr>
 
458
                        <tr>
 
459
                                <td>bottomPadding</td>
 
460
                                <td bottomPadding="24">
 
461
                                        <xpre>24</xpre>
 
462
                                </td>
 
463
                        </tr>
 
464
                        <tr>
 
465
                                <td>background</td>
 
466
                                <td background="pink">
 
467
                                        <xpre>pink</xpre>
 
468
                                </td>
 
469
                        </tr>
 
470
                        <tr>
 
471
                                <td>background</td>
 
472
                                <td background="lightblue">
 
473
                                        <xpre>lightblue</xpre>
 
474
                                </td>
 
475
                        </tr>
 
476
                        <tr>
 
477
                                <td>align</td>
 
478
                                <td align="left">
 
479
                                        <xpre>left</xpre>
 
480
                                </td>
 
481
                        </tr>
 
482
                        <tr>
 
483
                                <td>align</td>
 
484
                                <td align="center">
 
485
                                        <xpre>center</xpre>
 
486
                                </td>
 
487
                        </tr>
 
488
                        <tr>
 
489
                                <td>align</td>
 
490
                                <td align="right">
 
491
                                        <xpre>right</xpre>
 
492
                                </td>
 
493
                        </tr>
 
494
                        <tr>
 
495
                                <td>-
 
496
vAlign
 
497
-</td>
 
498
                                <td vAlign="top">
 
499
                                        <xpre>top</xpre>
 
500
                                </td>
 
501
                        </tr>
 
502
                        <tr>
 
503
                                <td>-
 
504
vAlign
 
505
-</td>
 
506
                                <td vAlign="middle">
 
507
                                        <xpre>middle</xpre>
 
508
                                </td>
 
509
                        </tr>
 
510
                        <tr>
 
511
                                <td>-
 
512
vAlign
 
513
-</td>
 
514
                                <td vAlign="bottom">
 
515
                                        <xpre>bottom</xpre>
 
516
                                </td>
 
517
                        </tr>
 
518
                </blockTable>
 
519
                <nextFrame/>
 
520
                <h2>Bulk Data Support</h2>
 
521
                <para>Very often one wants to get quite a lot of text or numeric data into a table - for
 
522
    example from a database query or imported data file.  Quoting all of this correctly as
 
523
    XML and wrapping in in td and tr tags is time and memory consumuing, unquoting and parsing it
 
524
    all back even more so.  Therefore, instead of explicitly creating row and cell tags, you
 
525
    can now use a new <b>bulkData</b> tag.  This lets you specify a delimiter for fields (default
 
526
    is comma) and for records (default is newline), and rml2pdf will break this up.</para>
 
527
                <para>If you want to avoid having to quote ampersands, wrap this in a CDATA escape sequence.</para>
 
528
                <para>Of course if you want per-cell formatting or to put arbitrary flowables in a cell, you
 
529
    must use the other tags.</para>
 
530
                <spacer length="24"/>
 
531
                <blockTable style="numeric">
 
532
                       <bulkData><![CDATA[
 
533
Product,Profit
 
534
Sprockets,26
 
535
Widgets,34
 
536
Thingummies,217
 
537
Bits & Bobs,23
 
538
Total,277
 
539
        ]]></bulkData>
 
540
                </blockTable>
 
541
                <spacer length="24"/>
 
542
                <para>You can specify a tab with <b>fieldDelim="\t"</b>, but we generally advise against using any
 
543
        whitespace character as a delimiter if you have a choice.  You can also specify fine-grained 
 
544
        "stripping" control; the default behaviour
 
545
        is to strip whitespace off the top and bottom of the overall data block, so blank lines are
 
546
        excluded, and off the ends of each row so line endings and indentation don't matter, but not off each 
 
547
        cell.  Note that the strings in the cells may contain spaces
 
548
        and these spaces will be respected in formatting.  You are also advised to use a CDATA
 
549
        escape sequence around your data so that "&amp;","&lt;" and "&gt;",  characters don't
 
550
        need special handling.</para>
 
551
                <h2>Excel Bulk Data Support</h2>
 
552
                <para>The <b>excelData</b> tag is very similar to the bulk data support, but reads the bulk
 
553
                data from an Excel file instead of from delimited textual data.  The <b>range</b> attribute is
 
554
                optional.</para>
 
555
                <spacer length="24"/>
 
556
                <h3><font color="red">
 
557
                  Sorry Ecel Bulk Support is not yet here
 
558
                </font></h3>
 
559
<!--
 
560
                <blockTable style="numeric">
 
561
                        <excelData fileName="exceldata.xls" sheetName="Sheet1" range="A1:B7" />
 
562
                </blockTable>
 
563
-->
 
564
                <spacer length="24"/>
 
565
                <h2>Colour cycles by rows and columns</h2>
 
566
                <para>It's sometimes nice to alternate colours by row (e.g. a pale color then
 
567
                white) to visually break up a long table.  The style lets you specify <b>cycles</b> as
 
568
                well as single colours.  Here we have created a style command which cycles through
 
569
                pale green and white, like old stacks of fanfold paper...</para>
 
570
                <blockTable align="LEFT">
 
571
                        <blockTableStyle id="repeater" spaceBefore="12">
 
572
                                <lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
 
573
                                <blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
 
574
                                <blockBottomPadding length="1"/>
 
575
                                <blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
 
576
                                <lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
 
577
                                <!--body section-->
 
578
                                <blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
 
579
                                <blockTopPadding length="1" start="0,1" stop="-1,-1"/>
 
580
                                <blockBackground colorsByRow="0xD0FFD0;None" start="0,1" stop="-1,-1"/>
 
581
                        </blockTableStyle>
 
582
                        <tr>
 
583
                                <td>Date</td>
 
584
                                <td>Item</td>
 
585
                                <td>Debit</td>
 
586
                                <td>Credit</td>
 
587
                        </tr>
 
588
                        <tr>
 
589
                                <td>28-09-2004</td>
 
590
                                <td>Expensive lunch with clients</td>
 
591
                                <td>100</td>
 
592
                                <td>-</td>
 
593
                        </tr>
 
594
                        <tr>
 
595
                                <td>28-09-2004</td>
 
596
                                <td>Expensive lunch with clients</td>
 
597
                                <td>100</td>
 
598
                                <td>-</td>
 
599
                        </tr>
 
600
                        <tr>
 
601
                                <td>28-09-2004</td>
 
602
                                <td>Expensive lunch with clients</td>
 
603
                                <td>100</td>
 
604
                                <td>-</td>
 
605
                        </tr>
 
606
                        <tr>
 
607
                                <td>28-09-2004</td>
 
608
                                <td>Expensive lunch with clients</td>
 
609
                                <td>100</td>
 
610
                                <td>-</td>
 
611
                        </tr>
 
612
                        <tr>
 
613
                                <td>28-09-2004</td>
 
614
                                <td>Expensive lunch with clients</td>
 
615
                                <td>100</td>
 
616
                                <td>-</td>
 
617
                        </tr>
 
618
                        <tr>
 
619
                                <td>28-09-2004</td>
 
620
                                <td>Expensive lunch with clients</td>
 
621
                                <td>100</td>
 
622
                                <td>-</td>
 
623
                        </tr>
 
624
                        <tr>
 
625
                                <td>28-09-2004</td>
 
626
                                <td>Expensive lunch with clients</td>
 
627
                                <td>100</td>
 
628
                                <td>-</td>
 
629
                        </tr>
 
630
                        <tr>
 
631
                                <td>28-09-2004</td>
 
632
                                <td>Expensive lunch with clients</td>
 
633
                                <td>100</td>
 
634
                                <td>-</td>
 
635
                        </tr>
 
636
                        <tr>
 
637
                                <td>28-09-2004</td>
 
638
                                <td>Expensive lunch with clients</td>
 
639
                                <td>100</td>
 
640
                                <td>-</td>
 
641
                        </tr>
 
642
                        <tr>
 
643
                                <td>28-09-2004</td>
 
644
                                <td>Expensive lunch with clients</td>
 
645
                                <td>100</td>
 
646
                                <td>-</td>
 
647
                        </tr>
 
648
                        <tr>
 
649
                                <td>28-09-2004</td>
 
650
                                <td>Expensive lunch with clients</td>
 
651
                                <td>100</td>
 
652
                                <td>-</td>
 
653
                        </tr>
 
654
                        <tr>
 
655
                                <td>28-09-2004</td>
 
656
                                <td>Expensive lunch with clients</td>
 
657
                                <td>100</td>
 
658
                                <td>-</td>
 
659
                        </tr>
 
660
                        <tr>
 
661
                                <td>28-09-2004</td>
 
662
                                <td>Expensive lunch with clients</td>
 
663
                                <td>100</td>
 
664
                                <td>-</td>
 
665
                        </tr>
 
666
                        <tr>
 
667
                                <td>28-09-2004</td>
 
668
                                <td>Expensive lunch with clients</td>
 
669
                                <td>100</td>
 
670
                                <td>-</td>
 
671
                        </tr>
 
672
                        <tr>
 
673
                                <td>28-09-2004</td>
 
674
                                <td>Expensive lunch with clients</td>
 
675
                                <td>100</td>
 
676
                                <td>-</td>
 
677
                        </tr>
 
678
                        <tr>
 
679
                                <td>28-09-2004</td>
 
680
                                <td>Expensive lunch with clients</td>
 
681
                                <td>100</td>
 
682
                                <td>-</td>
 
683
                        </tr>
 
684
                        <tr>
 
685
                                <td>28-09-2004</td>
 
686
                                <td>Expensive lunch with clients</td>
 
687
                                <td>100</td>
 
688
                                <td>-</td>
 
689
                        </tr>
 
690
                        <tr>
 
691
                                <td>28-09-2004</td>
 
692
                                <td>Expensive lunch with clients</td>
 
693
                                <td>100</td>
 
694
                                <td>-</td>
 
695
                        </tr>
 
696
                        <tr>
 
697
                                <td>28-09-2004</td>
 
698
                                <td>Expensive lunch with clients</td>
 
699
                                <td>100</td>
 
700
                                <td>-</td>
 
701
                        </tr>
 
702
                        <tr>
 
703
                                <td>28-09-2004</td>
 
704
                                <td>Expensive lunch with clients</td>
 
705
                                <td>100</td>
 
706
                                <td>-</td>
 
707
                        </tr>
 
708
                        <tr>
 
709
                                <td>28-09-2004</td>
 
710
                                <td>Bottom row should be greem</td>
 
711
                                <td>110</td>
 
712
                                <td>-</td>
 
713
                        </tr>
 
714
                </blockTable>
 
715
                <nextFrame/>
 
716
                <para>Try again by column, with three colors this time.  Also ensure some row heights
 
717
                vary to check accuracy of drawing.</para>
 
718
                <blockTable align="RIGHT">
 
719
                        <blockTableStyle id="repeater2" spaceBefore="12">
 
720
                                <lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
 
721
                                <lineStyle kind="GRID" colorName="gray" thickness="0.25"/>
 
722
                                <blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
 
723
                                <blockBottomPadding length="1"/>
 
724
                                <blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
 
725
                                <lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
 
726
                                <!--body section-->
 
727
                                <blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
 
728
                                <blockTopPadding length="1" start="0,1" stop="-1,-1"/>
 
729
                                <blockBackground colorsByRow="0xD0FFD0;0xFFD0FF;None" start="0,1" stop="-1,-1"/>
 
730
                        </blockTableStyle>
 
731
                        <tr>
 
732
                                <td>Date</td>
 
733
                                <td>Item</td>
 
734
                                <td>Debit</td>
 
735
                                <td>Credit</td>
 
736
                        </tr>
 
737
                        <tr>
 
738
                                <td>28-09-2004</td>
 
739
                                <td>Expensive lunch with clients</td>
 
740
                                <td>100</td>
 
741
                                <td>-</td>
 
742
                        </tr>
 
743
                        <tr>
 
744
                                <td>28-09-2004</td>
 
745
                                <td>Expensive lunch with clients</td>
 
746
                                <td>100</td>
 
747
                                <td>-</td>
 
748
                        </tr>
 
749
                        <tr>
 
750
                                <td>28-09-2004</td>
 
751
                                <td>Expensive lunch with clients
 
752
plus magnum of champagne</td>
 
753
                                <td>400</td>
 
754
                                <td>-</td>
 
755
                        </tr>
 
756
                        <tr>
 
757
                                <td>28-09-2004</td>
 
758
                                <td>Expensive lunch with clients</td>
 
759
                                <td>100</td>
 
760
                                <td>-</td>
 
761
                        </tr>
 
762
                        <tr>
 
763
                                <td>28-09-2004</td>
 
764
                                <td>Expensive lunch with clients</td>
 
765
                                <td>100</td>
 
766
                                <td>-</td>
 
767
                        </tr>
 
768
                        <tr>
 
769
                                <td>28-09-2004</td>
 
770
                                <td>Expensive lunch with clients</td>
 
771
                                <td>100</td>
 
772
                                <td>-</td>
 
773
                        </tr>
 
774
                        <tr>
 
775
                                <td>28-09-2004</td>
 
776
                                <td>Expensive lunch with clients</td>
 
777
                                <td>100</td>
 
778
                                <td>-</td>
 
779
                        </tr>
 
780
                        <tr>
 
781
                                <td>28-09-2004</td>
 
782
                                <td>Expensive lunch with clients</td>
 
783
                                <td>100</td>
 
784
                                <td>-</td>
 
785
                        </tr>
 
786
                        <tr>
 
787
                                <td>28-09-2004</td>
 
788
                                <td>Expensive lunch with clients</td>
 
789
                                <td>100</td>
 
790
                                <td>-</td>
 
791
                        </tr>
 
792
                </blockTable>
 
793
                <para>And now by column (although this may be used less...)</para>
 
794
                <blockTable>
 
795
                        <blockTableStyle id="repeater3" spaceBefore="12">
 
796
                                <lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
 
797
                                <lineStyle kind="GRID" colorName="gray" thickness="0.25"/>
 
798
                                <blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
 
799
                                <blockBottomPadding length="1"/>
 
800
                                <blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
 
801
                                <lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
 
802
                                <!--body section-->
 
803
                                <blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
 
804
                                <blockTopPadding length="1" start="0,1" stop="-1,-1"/>
 
805
                                <blockBackground colorsByCol="0xD0FFD0;None" start="0,1" stop="-1,-1"/>
 
806
                        </blockTableStyle>
 
807
                        <tr>
 
808
                                <td>Date</td>
 
809
                                <td>Item</td>
 
810
                                <td>Jan</td>
 
811
                                <td>Feb</td>
 
812
                                <td>Mar</td>
 
813
                                <td>Apr</td>
 
814
                                <td>May</td>
 
815
                                <td>Jun</td>
 
816
                                <td>Jul</td>
 
817
                                <td>Aug</td>
 
818
                                <td>Sep</td>
 
819
                                <td>Oct</td>
 
820
                                <td>Nov</td>
 
821
                                <td>Dec</td>
 
822
                                <td>Total</td>
 
823
                        </tr>
 
824
                        <tr>
 
825
                                <td>Expenses</td>
 
826
                                <td>Entertainment</td>
 
827
                                <td>100</td>
 
828
                                <td>100</td>
 
829
                                <td>100</td>
 
830
                                <td>100</td>
 
831
                                <td>100</td>
 
832
                                <td>100</td>
 
833
                                <td>100</td>
 
834
                                <td>100</td>
 
835
                                <td>100</td>
 
836
                                <td>100</td>
 
837
                                <td>100</td>
 
838
                                <td>100</td>
 
839
                                <td>1200</td>
 
840
                        </tr>
 
841
                        <tr>
 
842
                                <td>Expenses</td>
 
843
                                <td>Entertainment</td>
 
844
                                <td>100</td>
 
845
                                <td>100</td>
 
846
                                <td>100</td>
 
847
                                <td>100</td>
 
848
                                <td>100</td>
 
849
                                <td>100</td>
 
850
                                <td>100</td>
 
851
                                <td>100</td>
 
852
                                <td>100</td>
 
853
                                <td>100</td>
 
854
                                <td>100</td>
 
855
                                <td>100</td>
 
856
                                <td>1200</td>
 
857
                        </tr>
 
858
                        <tr>
 
859
                                <td>Expenses</td>
 
860
                                <td>Entertainment</td>
 
861
                                <td>100</td>
 
862
                                <td>100</td>
 
863
                                <td>100</td>
 
864
                                <td>100</td>
 
865
                                <td>100</td>
 
866
                                <td>100</td>
 
867
                                <td>100</td>
 
868
                                <td>100</td>
 
869
                                <td>100</td>
 
870
                                <td>100</td>
 
871
                                <td>100</td>
 
872
                                <td>100</td>
 
873
                                <td>1200</td>
 
874
                        </tr>
 
875
                        <tr>
 
876
                                <td>Expenses</td>
 
877
                                <td>Entertainment</td>
 
878
                                <td>100</td>
 
879
                                <td>100</td>
 
880
                                <td>100</td>
 
881
                                <td>100</td>
 
882
                                <td>100</td>
 
883
                                <td>100</td>
 
884
                                <td>100</td>
 
885
                                <td>100</td>
 
886
                                <td>100</td>
 
887
                                <td>100</td>
 
888
                                <td>100</td>
 
889
                                <td>100</td>
 
890
                                <td>1200</td>
 
891
                        </tr>
 
892
                        <tr>
 
893
                                <td>Expenses</td>
 
894
                                <td>Entertainment</td>
 
895
                                <td>100</td>
 
896
                                <td>100</td>
 
897
                                <td>100</td>
 
898
                                <td>100</td>
 
899
                                <td>100</td>
 
900
                                <td>100</td>
 
901
                                <td>100</td>
 
902
                                <td>100</td>
 
903
                                <td>100</td>
 
904
                                <td>100</td>
 
905
                                <td>100</td>
 
906
                                <td>100</td>
 
907
                                <td>1200</td>
 
908
                        </tr>
 
909
                </blockTable>
 
910
 
 
911
 
 
912
                <h2>Splitting over pages - top and bottom rows</h2>
 
913
                <para>Sometimes a table splits over a page and you don't have a grid, so the bottom part (and top of the
 
914
                new page) have no line boxing them in.  The splitfirst and splilast magic coordinates can be used to insert
 
915
                a line drawing routine into the style for this. I used an ugly thick purple line!</para>
 
916
                <blockTable repeatRows="1">
 
917
                        <blockTableStyle id="repeater" spaceBefore="12">
 
918
                                <lineStyle kind="OUTLINE" colorName="black" thickness="0.5"/>
 
919
                                <blockFont name="Times-Bold" size="6" leading="7" start="0,0" stop="-1,0"/>
 
920
                                <blockBottomPadding length="1"/>
 
921
                                <blockBackground colorName="0xD0D0D0" start="0,0" stop="-1,0"/>
 
922
                                <lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0" thickness="0.5"/>
 
923
                                <!--body section-->
 
924
                                <blockFont name="Times-Roman" size="6" leading="7" start="0,1" stop="-1,-1"/>
 
925
                                <blockTopPadding length="1" start="0,1" stop="-1,-1"/>
 
926
                                <blockBackground colorsByRow="0xD0FFD0;None" start="0,1" stop="-1,-1"/>
 
927
                                <blockAlignment value="right" start="1,1" stop="-1,-1"/>
 
928
                                
 
929
                                <!-- ensure the bottom of the table is 'closed off' during the split.  I've used an ugly red dashed line -->
 
930
                                <lineStyle kind="LINEBELOW" colorName="purple" start="0,splitlast" stop="-1,splitlast" thickness="3"/>
 
931
                                
 
932
                                
 
933
                        </blockTableStyle>
 
934
                        <tr>    <td>Date</td><td>Item</td><td>Debit</td><td>Credit</td></tr>
 
935
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
936
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
937
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
938
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
939
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
940
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
941
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
942
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
943
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
944
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
945
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
946
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
947
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
948
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
949
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
950
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
951
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
952
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
953
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
954
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
955
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
956
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
957
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
958
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
959
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
960
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
961
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
962
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
963
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
964
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
965
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
966
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
967
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
968
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
969
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
970
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
971
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
972
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
973
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
974
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
975
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
976
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
977
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
978
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
979
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
980
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
981
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
982
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
983
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
984
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
985
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
986
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
987
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100</td><td>-</td></tr>
 
988
                        <tr>    <td>28-09-2004</td><td>Expensive lunch with clients</td><td>100  </td><td>-</td></tr>
 
989
 
 
990
                </blockTable>
 
991
 
 
992
                <bookmark name="BACK_PAGE"/>
 
993
        </story>
 
994
</document>