VB Crystal Report >> Concatenate fields from multiple records

by ZRexRider » Wed, 11 May 2005 01:02:17 GMT

Hi,

I have a Produc master record that may relate to 0 or more "tools".

Lets say the tools table has the following tools:

Hammer
Screwdriver
Wrench
Socket
Knife

And each product can be associated with 0 or more of these tools. I
want to list all descriptions of tools associated on one line of my
report or as one comma delimited string:

Product 1 - Product Description - Product Price...
Tools Required: "Hammer, Wrench, Socket"


How do I query all associated tools and concatenate them into one
string for placement on my report?

Thanks



Similar Threads

1. Needs to display multiple records of a field in a row

Hi,
    I need to display multiple records of a database field in a row.
Usally records are displaied line by line as follows...

FieldTitle
----------
Record1
Record2
.
.
.
RecordN

But I need to display it as follows...
FieldTitle: Record1 Record2 ... RecordN
N can be minimum 2 abd maximum 5

How can I do this?

Thanks

Hasan Shahriar Masud

2. Finding records in multiple fields

3. Populate field based on multiple selection in multiple fields

I am fairly new to word as my previous company had a program to generate 
letters and forms and my new company does not.   I have a form that is used 
when new business is generated.  I need the commission to auto populate based 
on the broker and product selected (both drop down lists).  There are too 
many combinations to use IF statements.  Any assistance you can provide is 
greatly appreciated.

4. Fields How do you split/concatenate strings - Word VBA

5. concatenating fields in a combo box.

Hi,

I am filling in a combobox.  I would like to concatenate two fields into the 
data combo box and display "last name, first name"

I tried to displaymember = "employee_last_name" & ", " & 
"employee_last_name",  but it did not like that. 

I can fill the combo box with either the first or the last, but I cannot 
manage to concatenate it.  

Any suggestions?  My code is below.

        'fill employee combo box.
        strsql = "SELECT * FROM Employee order by employee_last_name"
        ' Create data adapter object
        Dim daEmployee As OleDbDataAdapter = New OleDbDataAdapter(strsql, 
TSA.conn)
        ' Create a dataset object and fill with data using data adapter's 
Fill method
        Dim dsEmployee As DataSet = New DataSet
        daEmployee.Fill(dsEmployee, "Employee")
        ' Attach dataset's DefaultView to the datagrid control
        Dim dvEmployee As DataView = dsEmployee.Tables("Employee").DefaultView
        ComboBox5.DataSource = dvEmployee
        ComboBox5.DisplayMember = "employee_first_name"

Thanks in Advance!!
Elena

6. What is the SQL syntax to concatenate 2 fields in VBA for Excel - Excel

7. Missing characters/added spaces when concatenating fields.

I am using a text box to hold multiple string fields, and I am finding
that there are spaces missing and/or added spaces showing in my
report...

Inside the text box I have [String1][String2][String3](with no spaces
in between) and as a result, there are missing spaces/characters when
viewing the report:
 1 2 34 5 67 8 9

I have tried creating a formula field to concatenate the fields and
get an error "A string field can only be 254 characters or less". The
fields in the database are 255 characters, but when each field is
printed alone, there are no missing characters.

Any suggestions?

CR 8.5

Thank you!

japf`

8. Creating a concatenated field problem - VB Crystal Report