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 -> ASP

 Format negative number without a - or ()

Print topic Send  topic

Author Message
teresawhlr

Posts: 10
Posted: 10/15/2007, 8:32 PM

I have a label field that I want to have the following format:

Postivie value - Blue
Negative value- Red without - or () (ex. -2 would show in red as 2)
Zero value - don't display anything

I'm using the following format [Blue]#;[Red]#;# and everything displays properly except the negative number.

How / what number format do you use to force a negative number to not display - or ()?
View profile  Send private message
Oper


Posts: 1195
Posted: 10/16/2007, 6:08 AM

you could always use your own code

on before show event"

  
if sender.value >=0 then  
   Sender.value="<FONT color='#0000FF'>" & sender.value & "</font>"  
else  
   Sender.value="<FONT color='#FF0000'>" & (sender.value*-1) & "</font>"  
end if  

use FormatNumber(...) if needit

Note: define your textLABEL as HTML

_________________
____________________________
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
teresawhlr

Posts: 10
Posted: 10/16/2007, 7:48 AM

Thanks for your reply.

That works perfectly!!!!! :-)
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.