Print Page | Close Window

Concatenation

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4000
Printed Date: 03 May 2025 at 12:14am


Topic: Concatenation
Posted By: cardpogi
Subject: Concatenation
Date Posted: 15 Aug 2008 at 9:24am
Im trying to use Concatenation and im using this method can anyone tell me where im going wron? please go easy on me im pretty new....
"{ORIENTACIONES.NOMBRES}+" "+{ORIENTACIONES.PRIMER_APELLIDO}+" "+{ORIENTACIONES.SEGUNDO_APELLIDO}"



Replies:
Posted By: BrianBischof
Date Posted: 15 Aug 2008 at 12:12pm
what error are you getting? It's my guess that one of the fields returns a number and you can't concatenate this with a string. If so, use CStr(field) function to convert the number to a string.

I have the full Crystal syntax documented with tutorials in my Encyclopedia book. You can find out more about my books at http://www.amazon.com/exec/obidos/ASIN/0974953601/bischofsystem-20 - Amazon.com or reading the http://members.crystalreportsbook.com - Crystal Reports eBooks online.

-------------
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>


Posted By: cardpogi
Date Posted: 15 Aug 2008 at 4:42pm
uhm.. actually its 3 strings, stading out to First Name, Last Name, maiden Name, i want to join all three of them. with a space between them... i really dont get any error.. it just say's it has a syntax error once i try to save...


Posted By: BrianBischof
Date Posted: 16 Aug 2008 at 11:01am
I see that you have quotes at the beginning and end of the formula. Those should not be there. That makes Crystal reports get confused about the spaces separating the fields. Remove the quote at the beginning and end of the formula and see if the error goes away.

-------------
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>


Posted By: cardpogi
Date Posted: 18 Aug 2008 at 6:07am
nope.. i stil get an error.. when i try to save it says...
"There is an error in your formula. Do you want to save it anyway?"
and when i try to generate de preview, it says
"A Statment is expected here"


Posted By: cardpogi
Date Posted: 18 Aug 2008 at 9:22am
got it sorry was a dumb mistake on my behalf... thanks alot



Print Page | Close Window