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

 Format number issues

Print topic Send  topic

Author Message
Norbi
Posted: 12/11/2004, 5:02 PM

:-(
Hello,

I've a problem formating numbers. I thought it was simple, but got stuck. Here is what I want to achieve:

XX is a number

1. if XX>0 mark it RED
2. if XX<=0 mark it BLUE

and maintain the following formating
a) thousands separator - space
b) decimal separator - comma
c) two digits after comma

E.G.
99 999,33

And I am using the follwing formating:
[Red]#,##0.00;[BLUE]#,##0.00;[BLUE]0.00;;,; ;

It worked fine until I implemented BLUE color.
Hope someone could help me.

Thanks and best regards

Norbert
klwillis


Posts: 428
Posted: 12/13/2004, 11:32 AM

This may help ...
{$ > 0}[Red]#,##0.00;{$ <= 0}[BLUE]#,##0.00;




_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
Norbi
Posted: 12/14/2004, 4:55 AM

Quote klwillis:
This may help ...
{$ > 0}[Red]#,##0.00;{$ <= 0}[BLUE]#,##0.00;

Hi,
thanks for your answer. When I saw it I thought - yes why didn't I think about it ... but it didn't help as it seems that my CCS screws up generated code. After applying your format I get the following code:
  
        ifCDbl($this->Saldo->GetValue()) > 0 ) {  
                  $this->Saldo->Text = CCFormatNumber($this->Saldo->GetValue(), Array(False, 2, ".", ",", False, "", "", 1, True, "Red"));  
        } else if CDbl($this->Saldo->GetValue()) <= 0 {  
                  $this->Saldo->Text = CCFormatNumber($this->Saldo->GetValue(), Array(False, 2, ".", ",", False, "", "", 1, True, "BLUE"));  
        }  
I am going to submit a bug report to CCS.

Thanks for your help

Norbert

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.