Combine fields in a Data Report.

Posted on 2003-03-17
Medium Priority
Last Modified: 2010-05-03
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!
Question by:TinLemon
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 8153899

Use Crystal report and add a Formula Field Like:


Expert Comment

ID: 8154018
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




Author Comment

ID: 8154137
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"



Expert Comment

ID: 8203429
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.

EE Moderator

Accepted Solution

Mindphaser earned 0 total points
ID: 8240786
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question