I have a list of students (firstname, lastname, sectionname). I want to create 
a document of excellence certificates. I tried the following but I am getting 
only one page of the first student information.
Appreciate your help
<cfinvoke component="cfc.data.excelling"
          method="cfn_Excelling_UptoNowScore"
          sectionid=1
          scorepercent=70
          returnvariable="Students">
          
 <cfinvoke component="cfc.data.section"
                   method="cfn_Section_InfobySectionID"
           sectionid=1
           returnvariable="sectioninfo">
 <cfoutput query="sectioninfo">
        <cfset SectionDetail="#sectionname# (#semestername#)"/>
 </cfoutput>
         
<h1>Excellence Appreciation</h1>

<cfset error = "" />



        
        <cfif NOT Len(error)>
    
        <cfset pathToRTF =  GetDirectoryFromPath(GetCurrentTemplatePath()) & 
"Newcert.rtf" />     

        
        <cflock name="NewCert" type="exclusive" timeout="30">
  
                        
        <cfset rtf = FileRead(pathToRTF) />
        
           <cfloop query="students">
        
            <cfset rtf = Replace(rtf,"%firstname%","#firstname#") />
            <cfset rtf = Replace(rtf,"%lastname%","#lastname#") />
            <cfset rtf = Replace(rtf,"%SectionDetail%","#SectionDetail#") />
            
       <cfheader name="content-disposition" value="inline; 
filename=cert#Studentid#.doc" />
    
        <cfcontent type="application/msword"  >
                
                <cfoutput>#rtf#</cfoutput>
   
           
        </cfloop>  
            
        </cflock>
        
      
        </cfif> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:332644
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-community/unsubscribe.cfm

Reply via email to