<!-- #INCLUDE FILE="../library/rtflib_20050408.asp" -->
<%
dim RTF_OUTPUT, tableWidth, CellWidth
RTF_OUTPUT = ""
Function Append(strContent)
'THIS FUNCTION SIMPLIFIES APPENDING CONTENT TO THE MAIN RTF_CONTENT STRING
RTF_OUTPUT = RTF_OUTPUT & strContent
end function
SetVerticalMeasure("inches")
SetHorizontalMeasure("inches")
'==================================================
Append DrawRTFHeader("Doc Title","Document Subject","Doc Author","Company","Document Comments",RTF_FONT_ARIAL,11,false,8.5,11,"1","1","0.35","0.35",RTF_EDITABLE)
'==================================================
call RegisterFont(RTF_FONT_ARIAL, "12", 0, RTF_BLUE)
Append DrawParagraph("This is a sample table. This table should have 150 rows. When you print this doc, only the table row headers should have borders around them." & RTF_LINE_BREAK)
call RegisterTableSettings("c","c","c",null,null)
DIM sText, Collumn_1, Collumn_2, Collumn_3, RowCount
Collumn_1 = 2
Collumn_2 = 2
Collumn_3 = 2
Function TableHeader()
dim sText
sText = DrawChars("Left Table Header", null, null, null, null )
call RegisterTableCell(sText, Collumn_1, null, null, null, null, null, null, null, null, null )
sText = DrawChars("Middle Table Header", null, null, null, null )
call RegisterTableCell(sText, Collumn_2, null, null, null, null, null, null, null, null, null )
sText = DrawChars("Right Table Header", null, null, null, null )
call RegisterTableCell(sText, Collumn_3, null, null, null, null, null, null, null, null, null )
TableHeader = DrawTableRow(true, true, null, null, null, null )
end function
Append TableHeader()
for RowCount=1 TO 150
sText = "Row Number: " & RowCount
call RegisterTableCell(sText, Collumn_1, null, null, null, null, null, null, null, null, null )
sText = "Middle Table Cell Contents"
call RegisterTableCell(sText, Collumn_2, null, null, null, null, null, null, null, null, null )
sText = "Right Table Cell Content"
call RegisterTableCell(sText, Collumn_3, null, null, null, null, null, null, null, null, null )
Append DrawTableRow(false, false, null, null, null, null )
next
Append DrawParagraph("This is some sample text AFTER the table.")
'==================================================
Append DrawRTFFooter()
'==================================================
Response.ContentType="application/rtf"
Response.AddHeader "content-disposition", "filename=sample.rtf"
Response.Write RTF_OUTPUT
%>