Avatar of wade2000
wade2000 asked on

Crystal Report displaying multiple records

Using CR11 and trying to display notes for an organisation which has contacts
for example, at organsation ABC i met with contact1,contact2,contact3 and the note for that meeting

at the moment its displaying
ABC contact1 "the note"
ABC contact2  "the note"
ABC contact3  "the note"

the way i want it is
ACB Contact1,contact2,contact3 "the note"

This was fine when Select Distinct records was working, at the moment when i select it, i get this error
"Failed to retrive data from the database"

is there any other way to achieve this

Crystal Reports

Avatar of undefined
Last Comment
Mike McCracken

8/22/2022 - Mon

'This was fine when Select Distinct records was working'

I don't understand what is meant by this.  
To combine values in the way you describe involves either a formula field in CR or some stored procedure processing in the database.  It is not going to happen without some programming somewhere.

So if you were previously getting such output then you need to look at where that was coming from.
Mike McCracken

Agree.  Was the report working?
If so what changed in the report?


My mistake, Select Distinct records has nothing to do with it,
how do i get to work this way? ACB Contact1,contact2,contact3 "the note"

Your help has saved me hundreds of hours of internet surfing.
Mike McCracken

What fields are in the database?

Is there one record for each contact?

You can try this
Group on the meeting

Add a formula to the report header
Global StringVar ContactList := '';

In the group header
Global StringVar ContactList ;
ContactList := '';

In the detail section
Global StringVar ContactList ;
ContactList := ContactList & ', ' & {ContactField};

IN the group footer
Global StringVar ContactList ;
{MeetingField} &  '  '  & Mid(ContactList,3) & '  ' & {NoteField}


yes there is one record for each contact and the field are as follow
rpt.Note_contact_org  linked to rpt.contact , rpt.Org, rpt.note


Mike McCracken

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question