arie_ben
asked on
Group Name Formula Editor: problem with int formating
Hello,
I'm trying to customize a group Name like this:
CStr({Class.ClassID})+ " " +{Class.ClassDescription}
where ClassID is an Integer and ClassDescription a string.
Problem: the CStr({Class.ClassID}) expression returns "2.00"
so I get:
"2.00 Women pents"
"3.00 Men hats" etc...
instead of
"2 Women pents"
"3 Men hats"
how do I get the integer to be formated with no decimals?
Thanks
I'm trying to customize a group Name like this:
CStr({Class.ClassID})+ " " +{Class.ClassDescription}
where ClassID is an Integer and ClassDescription a string.
Problem: the CStr({Class.ClassID}) expression returns "2.00"
so I get:
"2.00 Women pents"
"3.00 Men hats" etc...
instead of
"2 Women pents"
"3 Men hats"
how do I get the integer to be formated with no decimals?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes this works.
Just to know CStr(Number, number decimals , seperator)
is this right?
(thanks for your quick answer, amazing!)
Just to know CStr(Number, number decimals , seperator)
is this right?
(thanks for your quick answer, amazing!)
bdreed is exactly right
CStr(367.4999,0)
Returns "367".
CStr(367.5000,0)
Returns "368".
When you use 0 it rounds the integer. I dont think in your case it will create a problem but just to let you know
Regards
Emre
CStr(367.4999,0)
Returns "367".
CStr(367.5000,0)
Returns "368".
When you use 0 it rounds the integer. I dont think in your case it will create a problem but just to let you know
Regards
Emre
ASKER
Thanks a lot.
Lots of time gain here...
Lots of time gain here...
arie_ben - Yes, that is correct. Check out the CR Help files on how to use ToText or Cstr. There is a wealth of different ways to use it that give you alot of control when converting non Text data into Text.
ASKER
thanks bdreed35, I'll check it.
ToText({Class.ClassID},0,"