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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Column Title in CFTABLE

Status
Not open for further replies.

monoone

Programmer
May 24, 2002
219
US
I am trying to Name the top of a column in a CFTABLE.

Something like this:

PRICE
$23.00
$24.00

How would I do this?

Here is the code for my CFTABLE:

--------------------------------

<CFCOL TEXT=&quot;#DateFormat(TimeStamp2,&quot;mm/dd/yy&quot;)#&quot; HEADER=&quot;<B>Date</B>&quot; WIDTH=&quot;10&quot; ALIGN=&quot;LEFT&quot;>
<CFCOL TEXT=&quot;#ManName#&quot; HEADER=&quot;<B>Manager</B>&quot; WIDTH=&quot;20&quot; ALIGN=&quot;LEFT&quot;>Manager
<CFCOL TEXT=&quot;#LocationName#&quot; HEADER=&quot;<B>Location</B>&quot; WIDTH=&quot;30&quot; ALIGN=&quot;LEFT&quot;>Location
<CFCOL TEXT=&quot;#LocationContact#&quot; HEADER=&quot;<B>Contact</B>&quot; WIDTH=&quot;20&quot; ALIGN=&quot;LEFT&quot;>Contact
<CFCOL TEXT=&quot;#ProdNo#&quot; HEADER=&quot;<B>Product</B>&quot; WIDTH=&quot;15&quot; ALIGN=&quot;LEFT&quot;>Product
<CFCOL TEXT=&quot;#LoanQty#&quot; HEADER=&quot;<B>Qty Loaned</B>&quot; WIDTH=&quot;5&quot; ALIGN=&quot;LEFT&quot;>Loaned
<CFCOL TEXT=&quot;#ReturnQty#&quot; HEADER=&quot;<B>Qty Returned</B>&quot; WIDTH=&quot;5&quot; ALIGN=&quot;LEFT&quot;>Returned
<CFCOL TEXT=&quot;#Evaluate(LoanQty- ReturnQty)#&quot; HEADER=&quot;<B>Still On Loan</B>&quot; WIDTH=&quot;5&quot; ALIGN=&quot;LEFT&quot;>Left
<CFCOL TEXT=&quot;#DollarFormat(Evaluate((LoanQty - ReturnQty)*UnitCost))#&quot; HEADER=&quot;<B>Price</B>&quot; WIDTH=&quot;10&quot; ALIGN=&quot;LEFT&quot;>Total

-----------------------------------

Any help would be great,

Thanks,

Eric
 
Code:
<CFCOL header=&quot;Date&quot; TEXT=&quot;#DateFormat(TimeStamp2,&quot;mm/dd/yy&quot;)#&quot; HEADER=&quot;<B>Date</B>&quot; WIDTH=&quot;10&quot; ALIGN=&quot;LEFT&quot;>...

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Hello;

That did not work - I get the following error.

--------------------------
Just in time compilation error

A duplicate attribute 'HEADER' has been encountered at document position (81:75) to (81:80) while processing tag CFCOL. Attributes with the same name cannot be provided more than once.

The last successfully parsed CFML construct was a CFCOL tag occupying document position (81:10) to (81:15).

----------------------------

Here is my ouput code:

----------------------------

<CFTABLE QUERY=&quot;GetLoaned&quot; STARTROW=&quot;1&quot;>



<CFCOL TEXT=&quot;#ManName#&quot; header=&quot;<STRONG>Manager</STRONG>&quot; WIDTH=&quot;20&quot; ALIGN=&quot;LEFT&quot;>Manager
<CFCOL TEXT=&quot;#LocationName#&quot; HEADER=&quot;<B>Location</B>&quot; WIDTH=&quot;30&quot; ALIGN=&quot;LEFT&quot;>Location
<CFCOL TEXT=&quot;#LocationContact#&quot; HEADER=&quot;<B>Contact</B>&quot; WIDTH=&quot;20&quot; ALIGN=&quot;LEFT&quot;>Contact
<CFCOL TEXT=&quot;#ProdNo#&quot; HEADER=&quot;<B>Product</B>&quot; WIDTH=&quot;15&quot; ALIGN=&quot;LEFT&quot;>Product
<CFCOL TEXT=&quot;#LoanQty#&quot; HEADER=&quot;<B>Qty Loaned</B>&quot; WIDTH=&quot;5&quot; ALIGN=&quot;LEFT&quot;>Loaned
<CFCOL TEXT=&quot;#ReturnQty#&quot; HEADER=&quot;<B>Qty Returned</B>&quot; WIDTH=&quot;5&quot; ALIGN=&quot;LEFT&quot;>Returned
<CFCOL TEXT=&quot;#Evaluate(LoanQty- ReturnQty)#&quot; HEADER=&quot;<B>Still On Loan</B>&quot; WIDTH=&quot;5&quot; ALIGN=&quot;LEFT&quot;>Left
<CFCOL TEXT=&quot;#DollarFormat(Evaluate((LoanQty - ReturnQty)*UnitCost))#&quot; HEADER=&quot;<B>Price</B>&quot; WIDTH=&quot;10&quot; ALIGN=&quot;LEFT&quot;>Total

</CFTABLE>
-----------------------------

Thanks,

Eric
 
Which cfcol tag is on line 81?

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
It was the first string but I changed the code so the error does not represent what code I have given you. What is happening is that I am getting an error due to the repeat of:

HEADER=&quot;Date&quot; HEADER=&quot;<B>Date</B>&quot;


YOUR CODE:

<CFCOL header=&quot;Date&quot; TEXT=&quot;#DateFormat(TimeStamp2,&quot;mm/dd/yy&quot;)#&quot; HEADER=&quot;<B>Date</B>&quot; WIDTH=&quot;10&quot; ALIGN=&quot;LEFT&quot;>...

It does not like that repeated.

 
Yeah - That is where i got the code but for some reason the header Label is not showing on the output - just the dynamic text is.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top