CFLOOP LIST & CFDOCUMENT
I have code to create a pdf like this. It works great
<cfdocument format="pdf" localUrl="yes" orientation="landscape" marginleft="0.10" marginright=".10" margintop="0.15" >
<cfdocumentitem type="footer"> <cfoutput>Page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput> </cfdocumentitem>
<cfquery name="Loads" datasource="dsn">
SELECT [company_id]
FROM datatable
WHERE ID =16598
</cfquery>
Rest of code based on ID
</cfdocument>
Now I want to loop through a list of ID's and create a combined pdf of all of the ID's in the list
like this
<cfloop list="16958,17019,17020" index="idx">
<cfdocument format="pdf" localUrl="yes" orientation="landscape" marginleft="0.10" marginright=".10" margintop="0.15" >
<cfdocumentitem type="footer"> <cfoutput>Page #cfdocument.currentpagenumber# of #cfdocument.totalpagecount#</cfoutput> </cfdocumentitem>
<cfquery name="Loads" datasource="dsn">
SELECT [company_id]
FROM datatable
WHERE ID =#idx#
</cfquery>
Rest of code based on ID
</cfdocument>
</cfloop>
But when I do this only the first pdf prints.
So in my example, the pdf for 16958 is generated but not 17019 or 17020
What am I doing wrong?
