cfdocument output problem

OK i have code that reads rows from a database from a field, i need this to output it in a pdf document, however when i do this it only outputs the second resord from the database, and not the first, third etc. if i take the cfdocument tag away and look at the infomation from the database on the page it displays no problem, just when i try output it in cfdocument it only outputs the second row from the database, here is my relevant code:

<CFQUERY NAME="getBooks" datasource="mybook">
SELECT userentry
FROM editbook
WHERE editbook = #url.id4#

<cfoutput><cfdocument format="pdf" orientation="portrait"><cfdocumentitem type="header">#entries#</cfdocumentitem></cfdocument></cfoutput>

Can anyone see where i am going wrong??


Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


Try this.

<cfdocument format="pdf" orientation="portrait">
    <cfdocumentitem type="header"><cfoutput>#entries#</cfoutput></cfdocumentitem>


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.