Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rendering Recordset in HTML Using Cfdocument

Status
Not open for further replies.

szeiss

Programmer
Apr 5, 2000
137
US
How do I do this? Or can I? Trying to render a recordset using HTML from an oracle 11g database thru CF 8 using cfdocument. I've gotten it to where the groups repeat for each data row, but haven't figured out how to get non-repeating group headers.

Code:
HEADING
   Group 1
      Data row
      Data row
   Group 2
      Data row
      Data row
   Group 3
      Data row
      Data row

Thanks,
Sherry
 
What do you mean by "non-repeatong"?


Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
One way is to use cfoutput's "group" feature. First order your query results by the "group X" column:

Code:
 SELECT Col FROM Table ORDER BY TheGroup1ColumnName, ...
Then add the "group" attribute to your output:

Code:
<cfoutput query="yourQuery" group="TheGroup1ColumnName">
     #TheGroup1ColumnName# <br />
     <!--- the extra tag is not a typo --->
     <cfoutput>
          #OtherColumn1# #OtherColumn2# ...<br />
     <cfoutput>
</cfoutput>



----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top