Link to home
Start Free TrialLog in
Avatar of TinLemon
TinLemon

asked on

Combine fields in a Data Report.

I have a data report that contains L_Name, F_Name, and M_Name and to conserve space I am trying to figure out how to combine these fields so 1 field will contain all three names as "Doe, John Q."  

I tried the method I would use in access, using the "=[L_Name]+....." in my field box method, but that didn't work.  Any other ideas?

Thanks in advance!
Avatar of JoaTex
JoaTex

Hi

Use Crystal report and add a Formula Field Like:
{L_Name}+","+{F_Name}+{M_Name}

Jo
try like this
for example, if you got 3 variables like LName, FName and MName, just combine them like this:

LName & FName & MName

If you want space between these you can do like this:

LName & vbTab & FName & vbTab & MName

'Or Like this:

LName & Space$(2) & FName & Space$(2)& MName

'if you want more space between them, change the two in
'a higher number

'It doesnt matter how you want to use it:

'a few examples:

'Putting it in a textbox:

Text1.Text = LName & Space$(2) & FName & Space$(2)& MName

'adding it to a list or datareport:

List1.additem LName & Space$(2) & FName & Space$(2)& MName

'Making a label:

Label1.Caption = LName & Space$(2) & FName & Space$(2)& MName

and so on


I hope this is usefull for you

Greetings,

Vincent







Avatar of TinLemon

ASKER

Vince, I think we are heading down the right path.  

The problem I've been having is still occuring.  I am using a DataEnvironment named ABC.  I am binding the data at design time through the properties menu of each Data Report text box.  When I place "LName & FName & MName" (or any of the other variations you presented to me) in the DataField property it says that "DataField ABC.LName & FName & MName cannot be found"

Thoughts?

A request has been made to refund and/or delete this question; if there are no objections within 72 hours, the request will be granted.

EXPERTS: Please leave your thoughts on the disposition of this question here.

Banath
EE Moderator
ASKER CERTIFIED SOLUTION
Avatar of Mindphaser
Mindphaser

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial