CodingSome CFML Stuffs Me Do

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Ken (SHIELDSIT)   
 To:  af (CAER)     
38447.21 In reply to 38447.20 
Ahh I see what you're saying. I can't test it right now, but I'll let you know how I make out. Thanks!


0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Ken (SHIELDSIT)      
38447.22 In reply to 38447.21 
You're trying to make it too easy. Computers are supposed to be too hard for mere users. That's why they pay us to come over and click the "print" button.

----
"Cellphones have turned people blessed with opposing thumbs and ten digits into monkeys hammering on a 2-inch touchscreen with all the speed and grace of a retarded badger molesting a tennis ball."
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  CHYRON (DSMITHHFX)     
38447.23 In reply to 38447.22 
I suppose but I'm a sucker for automation!


0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Ken (SHIELDSIT)      
38447.24 In reply to 38447.23 
As long as it breaks and causes extreme frustration and panic...

----
"Cellphones have turned people blessed with opposing thumbs and ten digits into monkeys hammering on a 2-inch touchscreen with all the speed and grace of a retarded badger molesting a tennis ball."
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  CHYRON (DSMITHHFX)     
38447.25 In reply to 38447.24 
When I want to show my power I reboot the mail server!


0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.26 In reply to 38447.25 

I think I'm approaching this from the wrong angle. I think I'd be better served if I put my effort into the SQL Server Reporting Service.

 

Have you or anyone here used it?



0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ken (SHIELDSIT)      
38447.27 In reply to 38447.26 
I've not used it - no idea if anyone else has though.
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.28 In reply to 38447.27 

I can fumble through most of it, but I'm having a hard time getting it to perform some math and getting it to let me select what I want from the database.

 

Think I'm going to buy a book about it.



0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Ken (SHIELDSIT)      
38447.29 In reply to 38447.25 

The point is not to show YOUR power (which frankly, there is none, but I'm not telling), but THEIR abject helplessness (of which there is a copious, abundant and boundless supply, until the end of time, oh lord).

 

The easiest way to do that is to go out and get smashed, then show up for work the next day. Enjoy.


----
"Cellphones have turned people blessed with opposing thumbs and ten digits into monkeys hammering on a 2-inch touchscreen with all the speed and grace of a retarded badger molesting a tennis ball."
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  CHYRON (DSMITHHFX)     
38447.30 In reply to 38447.29 
I'm not sure showing up for work smashed is going to do much on a weekend.
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Peter (BOUGHTONP)     
38447.31 In reply to 38447.30 
It's going to do great things. GREAT. THINGS. Oh yee of little fathe...

----
"Cellphones have turned people blessed with opposing thumbs and ten digits into monkeys hammering on a 2-inch touchscreen with all the speed and grace of a retarded badger molesting a tennis ball."
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.32 In reply to 38447.30 

Pete - These numbers are what I get if I query a table in my db. How can I add ONLY the positive numbers and ignore the negatives?

 

-114.68
79.50
-8.48
2221.93
3994.88
-142.04
2655.45
-157.36
1084.00
-108.40
986.85
-58.48
15258.80



0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ken (SHIELDSIT)      
38447.33 In reply to 38447.32 
Uh.... like this:

Select sum (colname)
from table
where colname > 0

?
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.34 In reply to 38447.33 
What is your schedule looking like this fine day? I need you to hold my hand and whisper in my ear!


0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  Ken (SHIELDSIT)      
38447.35 In reply to 38447.34 
Dunno. Ask me again in an hour, when I've eaten and might be more awake.
0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.36 In reply to 38447.35 
k thanks you handsome man!


0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.37 In reply to 38447.35 

OK I'm having a hell of a time getting the summing to work, do you think you can assist?

 

I've attached the code and the output thus far.

 

Thanks!



Attachments:
monthly_kiln_report.cfm

0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.38 In reply to 38447.37 
Hmm, this is kinda strange. It you look at the ungrouped output you can see that the numbers returned are correct. So where am I messing up Peter?

I've changed my code a bit: I moved the bit that zero's out the total and tests for a negative to the query output area.

code:
<table cellpadding="2" align="center">
			<tr>
				<td align="center"><font face="arial" size="4"><b>Kiln Number</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Batch Date</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Species</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Footage In</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Value In</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Footage Out</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Value Out</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Variance</b></font></td>
				<td align="center"><font face="arial" size="4"><b>Absorption</b></font></td>
				<td align="center"><font face="arial" size="4"><b>MFG Variance</b></font></td>
			</tr>
 
<!---
Loop the output and display it
--->
	<CFOUTPUT QUERY="kilns">
	<cfset intotal = 0>
<cfif rudTotal GT 0>
	<cfset intotal = intotal + rudTotal>
</cfif>			
<!---
Set values in our variables
--->
 
			<TR>
				<td align="center"><font face="arial" size="4">#ruhID#</TD>
				<td align="center"><font face="arial" size="4">#DateFormat(ruhDate, "MM/DD/YYYY")#</TD>
				<td align="center"><font face="arial" size="4">#MID(rudProductID,6,2)#</TD>
				<td align="center"><font face="arial" size="4">#NumberFormat(ConsumedVol, ",")#</TD>
				<td align="center"><font face="arial" size="4">#intotal#</td>
				<td align="center"><font face="arial" size="4">#NumberFormat(ProducedVol, ",")#</TD>
			</TR>
	</CFOUTPUT>
</TABLE>


Attachments:

0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Peter (BOUGHTONP)     
38447.39 In reply to 38447.38 
I know why it's doing it, but my head hurts and I can't figure out how to fix it. I'm zeroing the total out every loop. How the fuck to I fix it? Make another variable to hold the grand total?


0/0
 Reply   Quote More 

 From:  Ken (SHIELDSIT)   
 To:  Ken (SHIELDSIT)      
38447.40 In reply to 38447.39 
Just as I suspected. If I ungroup them I get the correct value. Grouped is wrong. Any idea how to get what I want?

This is the code that I've changed.

code:
CFOUTPUT QUERY="kilns" GROUP="ruhID">
	<cfset intotal = 0>
<cfif rudTotal GT 0>
	<cfset intotal = intotal + rudTotal>
	<cfset Total_Value_In = Total_Value_In + intotal>
</cfif>			


Attachments:

0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–40  41–60  61–75

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats