Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Concatenation problem Post Reply Post New Topic
Author Message
danmir
Newbie
Newbie
Avatar

Joined: 15 Jul 2007
Location: Mexico
Online Status: Offline
Posts: 6
Quote danmir Replybullet Topic: Concatenation problem
    Posted: 15 Jul 2007 at 10:41pm
Hi everyone, I have a (maybe) stupid question, and CR XI. When I try to concatenate a number field and a string, the numeric part always transfors to something like this: 2,007.00

I have a formula field, and it goes like this(in VB sintax):

Formula= "Aņo " & year(date)
or another try with just a number

Formula= "Number:" & numberField

I even tried to round it, or apply the Int() function, but I always get that number format, and since the field results in a string, I can't format the field... Please help!!! I' ve been triying many things snd i'm desperate now!!!
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 16 Jul 2007 at 12:29am
Yes, that is a common problem with converting numbers to strings. Try this formula for the number:
CStr(Year(date), "0000")

Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
danmir
Newbie
Newbie
Avatar

Joined: 15 Jul 2007
Location: Mexico
Online Status: Offline
Posts: 6
Quote danmir Replybullet Posted: 16 Jul 2007 at 8:26am
Thanks, it worked!!
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 16 Jul 2007 at 8:57am
Great!
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.