CFDOCUMENTITEM, Why Hast Thou Forsaken Me

Posted: February 26th, 2010 | Author: | Filed under: ColdFusion | 2 Comments »

I’m working on generating PDF reports in ColdFusion 8 using the quick and easy cfdocument tag, and discovered that I cannot open and close tables using cfdocumentitem headers and footers. Here’s what I would have liked to do…

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<cfdocument attributecollection="#cfdocAttributes#">
	<cfdocumentitem type="header">
		<table border="5">
		<tr>
			<th>ID</th>
			<th>Name</th>
		</tr>
	</cfdocumentitem>
	<cfdocumentitem type="footer">
		</table>
	</cfdocumentitem>
	<cfoutput query="qPeople">
		<tr>
			<td>#ID#</td>
			<td>#Name#</td>
		</tr>
	</cfoutput>
</cfdocument>

Apparently there is a work-around for this if one is using Open BlueDragon. If anyone out there has a ColdFusion 8 solution that they’d care to share I would appreciate it…and apparently so would fellow CF developer Renu Deshpande.


2 Comments on “CFDOCUMENTITEM, Why Hast Thou Forsaken Me”

  1. 1 Ben Nadel said at 3:47 pm on March 1st, 2010:

    You might want to try using the THEAD and TFOOT tags in the table markup. I know when I used to generated Excel docs and Word docs, they make use of the THEAD and TFOOT effective across pages. I can’t remember exactly what it did…. it might work nicely in CFDocument (haven’t tested).

  2. 2 Christopher Vigliotti said at 9:54 am on March 2nd, 2010:

    thanks for the suggestion Ben, but alas tfoot and thead did not help.


Leave a Reply