on 05-06-2010 7:09 AM
Hi,
I am getting following values against quantity:
100.000
200.000
I need result as
300.000
But I am getting result as
300.0
Please let me know the process to get the proper format in result...
Basha.
Are you talking about mapping?
Then you can use arithmetic function "FormatNum"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply Stefen...
I cann't use FormatNumber becuase I don't know exact length of the target filed. for example if I use 00000.000 then my output is adding two zeros preceding like 00310.000. It should be 310.000 not 00310.000.
So please provide some UDF for this requirement.
I am using the following UDF...eventhough my result is not adding 000 as decimals...
double sum = 0;
double result1 = 0;
for(int i=0;i<value.length;i++){
sum = sum+Double.valueOf(value<i>);
DecimalFormat df = new DecimalFormat("#.###");
result1 = Double.valueOf(df.format(sum));
}
result.addValue(result1);
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.