CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Setting graphic based on row results

Print topic Send  topic

Author Message
DJJWP


Posts: 77
Posted: 08/06/2009, 5:37 PM

The below function determines what picture starts a row of data based on the value of fields returned. I have them all working until I try to test "details" field for the word "power" in it anywhere. For some reason it does not like "LIKE"!!

In Before Show Row

Function brturnover_BeforeShowRow(Sender) 'brturnover_BeforeShowRow @404-4400D35A  'Custom Code @420-73254650 ' -------------------------   
  
If brturnover.automation.value = 1   
Then brturnover.Gears.Value = "../../images/movinggears3.gif"    
  
'Power  
elseif brturnover.automation.value = 0 and brturnover.Details.value LIKE "%POWER%"   
Then brturnover.Gears.Value = "../../images/PwrOut.gif"    
  
'Network   
elseif brturnover.automation.value = 0 and brturnover.ServerName.value = ""   
Then brturnover.Gears.Value = "../../images/Network.jpg"    
  
'Winserv   
elseif brturnover.automation.value = 0 and brturnover.ServerName.value <> ""   
Then brturnover.Gears.Value = "../../images/windows-logo.gif"  End If  
  
  ' ------------------------- 'End Custom Code  End Function 'Close brturnover_BeforeShowRow @404-54C34B28


I'm having an issue with this part...

elseif brturnover.automation.value = 0 and brturnover.Details.value LIKE "%POWER%"   
Then brturnover.Gears.Value = "../../images/PwrOut.gif"

Because I want to test if it just "contains" and is not equal to a value, it fails.

I have tried:
brturnover.automation.value = 0 and brturnover.Details.value LIKE '%POWER%'
brturnover.automation.value = 0 and brturnover.Details.value LIKE "%POWER%"

What am I missing here?

ASP on Windows MySQL
_________________
Network Operations Rule
View profile  Send private message
Oper


Posts: 1195
Posted: 08/06/2009, 8:58 PM

LIKE is not a ASP Function/command

  
brturnover.automation.value = 0 and instr(brturnover.Details.value, "POWER") > 0  

if for some reason the POWER have a chance to come in lowercase use this:
  
brturnover.automation.value = 0 and instr(UCASE(brturnover.Details.value), "POWER") > 0  

_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
DJJWP


Posts: 77
Posted: 08/18/2009, 4:43 PM

That worked! Thanks
_________________
Network Operations Rule
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.