on 06-17-2013 4:16 PM
Hi,
i am using the following formula to search and publish values within crystal Reports using a collector:
This is the coding which works fine with normal numbers:
select{HQ_HMCOPA01_ERG3_BOCRE.Abweichungen COPA BOCRE}
case "Abweichung zum Vorjahr %" : (
s_8 := cStr(Round(Val({HQ_HMCOPA01_ERG3_BOCRE.01. Umsatz})),0)
)
default : dummy := "0"
;
{HQ_HMCOPA01_ERG3_BOCRE.Abweichungen COPA BOCRE};
The above mentioned formula has also been used to round up a percentage value.
In BEX it looks like this "screenshot 1":
The original percentage number has been formated within the Query and rounded.
-191,077546761 will be 191,1
This is the result that I need in Crystal as well.
In Crystal I get the following number: -191.077546761 (it sets an . instead of an ,
So if i use my function above the result will be "screenshot 2"
Any ideas?
Thanks for your help
hi Angelo,
if you use something like
totext({HQ_HMCOPA01_ERG3_BOCRE.Abweichungen COPA BOCRE},1,'#,###.##',',')
you should get the desired result.
the online help for totext has a description of all the parameters of the totext function.
cheers,
jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
a couple of things that could be going wrong:
1) if you're creating a case statement or an if then else statement, the output types of each case must match...i.e. in your case they must all be string type
2) you can't use totext on a string...you can use tonumber on a string and then totext it afterwards though
if the above doesn't fix it, we'd really need to the exact error produced as well as the data that caused the error.
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.