Repeating Report Page Headers

How to create repeating report page headers in CF*

Page 1 of 1

5 Replies - 1889 Views - Last Post: 06 January 2011 - 06:30 PM Rate Topic: -----

#1 RichieA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-May 07

Repeating Report Page Headers

Posted 20 December 2010 - 07:16 AM

They say to use CFLOOP, etc.

But I am reading a data table that has all the data and I'm using a CFOUTPUT QUERY to extract the data and process it through the report Headers and the data column by column, and line by line.

My question is: If I CFLOOP for the headers and around the data, how does CFLOOP handle the cfoutput query data?

Is this the right way to do this?

Thanks,

RichieA
Is This A Good Question/Topic? 0
  • +

Replies To: Repeating Report Page Headers

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1912
  • View blog
  • Posts: 3,441
  • Joined: 13-January 08

Re: Repeating Report Page Headers

Posted 20 December 2010 - 08:18 AM

Hard to say without seeing what you have now and what you're wanting to do with a CFLOOP. Couple of questions:
  • Is the CFOUTPUT QUERY working for you now?
  • Who is "they" when "they say to use CFLOOP"?

As a dev, I have come to learn two very solid facts about development: 1.) CFOUTPUT QUERY runs only marginally faster than an equal CFLOOP process but the difference is so small as to be negligible 2.) If it's working fine, leave it alone

To answer your question though, you can do everything you do with a CFOUTPUT QUERY with a CFLOOP. If you want to post the portion of your code with the cfoutput loop to see how it would look as a cfloop, go ahead and one of us can prolly shoot you back some suggested code.

But really, if it's working fine now and the only reason you're considering changing it is because "they" said so...tell "them" to take a hike. :)
Was This Post Helpful? 0
  • +
  • -

#3 Guest_RichieA*


Reputation:

Re: Repeating Report Page Headers

Posted 06 January 2011 - 03:21 PM

View PostCraig328, on 20 December 2010 - 07:18 AM, said:

Hard to say without seeing what you have now and what you're wanting to do with a CFLOOP. Couple of questions:
  • Is the CFOUTPUT QUERY working for you now?
  • Who is "they" when "they say to use CFLOOP"?

As a dev, I have come to learn two very solid facts about development: 1.) CFOUTPUT QUERY runs only marginally faster than an equal CFLOOP process but the difference is so small as to be negligible 2.) If it's working fine, leave it alone

To answer your question though, you can do everything you do with a CFOUTPUT QUERY with a CFLOOP. If you want to post the portion of your code with the cfoutput loop to see how it would look as a cfloop, go ahead and one of us can prolly shoot you back some suggested code.

But really, if it's working fine now and the only reason you're considering changing it is because "they" said so...tell "them" to take a hike. :)

Was This Post Helpful? 0

#4 RichieA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-May 07

Re: Repeating Report Page Headers

Posted 06 January 2011 - 06:12 PM

View PostCraig328, on 20 December 2010 - 08:18 AM, said:

Hard to say without seeing what you have now and what you're wanting to do with a CFLOOP. Couple of questions:
  • Is the CFOUTPUT QUERY working for you now?
  • Who is "they" when "they say to use CFLOOP"?

As a dev, I have come to learn two very solid facts about development: 1.) CFOUTPUT QUERY runs only marginally faster than an equal CFLOOP process but the difference is so small as to be negligible 2.) If it's working fine, leave it alone

To answer your question though, you can do everything you do with a CFOUTPUT QUERY with a CFLOOP. If you want to post the portion of your code with the cfoutput loop to see how it would look as a cfloop, go ahead and one of us can prolly shoot you back some suggested code.

But really, if it's working fine now and the only reason you're considering changing it is because "they" said so...tell "them" to take a hike. :)

Was This Post Helpful? 0
  • +
  • -

#5 RichieA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 09-May 07

Re: Repeating Report Page Headers

Posted 06 January 2011 - 06:19 PM

To follow up to my reply: Using Cold Fusion and reading data from a table, can I still use the cfoutput query and somehow page break the report and repeat the headers as many pages as needed?
Was This Post Helpful? 0
  • +
  • -

#6 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1912
  • View blog
  • Posts: 3,441
  • Joined: 13-January 08

Re: Repeating Report Page Headers

Posted 06 January 2011 - 06:30 PM

Richie, as before, without seeing the actual code any answers you might get here would be theoretical at best.

In general terms, yes, you can figure out as you output rows how many iterations you are into your output loop and then determine that every n rows you insert a report header. However, if you're using cfdocument or cfreport, there are other ways to accomplish the insertion of page breaks and page headers (and footers).

If you like, please feel free to post the code you have and we can see what kind of assistance we can lend.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1