I have a query that pulls a users information (Id, FirstName,
LastName, Title,etc). I then use cfdocument to output a person's
biography into a pdf. This is great, because we no longer have to
manually create bios, as they are now all dynamically generated.
The problem I have now is that we want to be able to select
multiple users and create a .pdf with each of their bios included
in the one pdf.
How do I loop thru records from a sql database in a
cfdocument that includes a header and footer in cfdocument items,
and ensure that one persons bio doesn't continue on the page with
Put the query around just the body of your cfdocument not
around the whole cfdocument tag. Also, move any query information
out of the header and put that in the body of the document. Lastly,
put a cfdocumentitem pagebreak after each bio...you will need to
check the recordcount of the query against the row you are on so
that you don't add an empty page break at the end.