CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 IF THEN ELSE Statement

Print topic Send  topic

Author Message
lkarelee

Posts: 10
Posted: 07/03/2008, 9:00 AM

I'm having problems using IF THEN ELSE syntax in CCS.

If a certain text field is 'PM' then I want other fields to be BLUE - if the field is "VEN" then I want the fields to be ORANGE - Otherwise - the text should be GREEN - here is my syntax - but I keep getting SYNTAX error

IF STATUS.Text LIKE "PM" Then
DISPUNIT_NO.Text = ("<font color=BLUE>"&(DISPUNIT_NO.Text).ToString()&"</font>").ToString()
OR IF STATUS.Text LIKE "VEN" Then
DISPUNIT_NO.Text = ("<font color=ORANGE>"&(DISPUNIT_NO.Text).ToString()&"</font>").ToString()
Else STATUS.Text = ("<font color=GREEN>"&(STATUS.Text).ToString()&"</font>").ToString()
End if
View profile  Send private message
GeorgeS

Posts: 206
Posted: 07/03/2008, 7:06 PM

http://www.w3schools.com/VBScript/vbscript_conditionals.asp
_________________
GeorgeS
View profile  Send private message
Waspman

Posts: 948
Posted: 07/03/2008, 11:58 PM

This is how I do it...

if CALL_Log.RBDate.value < Date()then
CALL_Log.RBDate.text= "<b><font color='red'>"& Call_Log.RBDate.Value & "</b></font>"
end if

Before show event of object.

The link above wouldn't help you...

Should you make the default colour green, no need to include it in the statement?

;-)T
_________________
http://www.waspmedia.co.uk
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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