I am new to FB ( I know CF fairly well), and I am having a hard time trying to figure out how to output a report to a RTF file. I created an RTF file in my rtfdocs folder called DocTemplate.rtf that has my "placeholders" there.
My code in my display page is this:
<cfset thisFolder = getDirectoryFromPath(getCurrentTemplatePath())>
<cfset templatepath = thisFolder & "rtfDocs\DocTemplate.rtf">

<cffile action="" file="#TemplatePath#" variable="RTF">

<cfset RTF = replace(RTF, "%legalvalue%", CountStpType.legalValue)>
<cfset RTF = replace(RTF, "%CountOfstampStatus%", CountStpType.CountOfstampStatus)>

<CFHEADER NAME="content-disposition" VALUE="filename=statuscount.doc">
<CFCONTENT TYPE="application/msword"><cfoutput>#RTF#</cfoutput>

When I run the page, it opens a rtf document with a bunch of ascii characters and jibberish. This task is easily done in CF, what am I doing wrong in FB?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to