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