Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

<cfquery> / <cfdocument> / <cfoutput> Dilemma

Engaged ,
Oct 10, 2008 Oct 10, 2008
Greetings to all,

I have tried to figure this out on my own without
having much luck an am posting here to get a
another set of eyes to review the situation.

I have a query that returns 29 records. I desire
to display the output in the following manner.

Page 1 ( 13 records ) – records 1 thru 13
Page 2 ( 13 records ) – records 14 thru 26
Page 3 ( 03 records ) – records 27 thru 40

Here is what is displaying.

Page 1 ( 13 records ) – records 1 thru 13
Page 2 ( 16 records ) – records 14 thru 29
Page 3 ( 03 records ) – records 27 thru 29

Here is my current code. Perhaps someone in here
can look it over and bring to surface what it is I am
missing and direct me in the right direction to achieve
my desired output.

<cfquery name="qname" datasource="dsname">
SELECT
Count(dept_name) AS dept_count, dept_name
FROM
ncrfa_value_added_leadership
GROUP BY
dept_name
ORDER BY
dept_name ASC
</cfquery>

<cfdocument
format="PDF"
pagetype="letter"
margintop=".50"
marginbottom=".50"
marginright=".50"
marginleft=".50"
orientation="portrait"
unit="in"
backgroundvisible="yes"
overwrite="no"
fontembed="yes">

<cfoutput query="rs_billing" startrow="1" maxrows="13">
#NumberFormat(CurrentRow,00)# #dept_name#<br>
</cfoutput>

<cfdocumentitem type="pagebreak" />

<cfoutput query="rs_billing" startrow="14" maxrows="26">
#NumberFormat(CurrentRow,00)# #dept_name#<br>
</cfoutput>

<cfdocumentitem type="pagebreak" />

<cfoutput query="rs_billing" startrow="27" maxrows="40">
#NumberFormat(CurrentRow,00)# #dept_name#<br>
</cfoutput>

</cfdocument>

Thanks in advance for assistance

Leonard
332
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Oct 10, 2008 Oct 10, 2008
Your maxrows are set incorrectly... if you keep them all at 13 it would work the way you wanted.
Translate
Guest
Oct 10, 2008 Oct 10, 2008
Your maxrows are set incorrectly... if you keep them all at 13 it would work the way you wanted.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 10, 2008 Oct 10, 2008
LATEST
Hi eightcharacters,

Well crap and a head slap. Thanks for the second set of eyes.
I was just focusing too hard on the thing and obviously thinking
a different path.

Again appreciate the second set of eyes on the situation.

Leonard

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources