Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Concatentating String to Data Field Post Reply Post New Topic
Author Message
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Topic: Concatentating String to Data Field
     Posted: 12 Mar 2010 at 1:59am
Hi

Looking for information on concatenating a piece of string to an integer data value in a report. The data value is returned from a function within the procedure select statement. I need to do something like the following:

35 + "My Text"

Is this possible in CR?

Thanks

G
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Mar 2010 at 4:51am
35 + tonumber('My text')
IP IP Logged
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Posted: 12 Mar 2010 at 4:55am
Ok thanks.
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 Mar 2010 at 7:39am
Or are you trying to achieve "35" & "My Text"
IP IP Logged
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Posted: 15 Mar 2010 at 6:27am
Originally posted by kevlray

Or are you trying to achieve "35" & "My Text"


No with integer but I used cast in the sql stored procedure like:

CAST(35 AS Varchar) + 'text' AS Field
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Mar 2010 at 6:34am

totext(table.numberfield,0,'') + 'My Text'



Edited by DBlank - 15 Mar 2010 at 6:41am
IP IP Logged
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