>Person Info - group > >Home Office Cell E-Mail (Type)If you want all the contact information in one row, you only need one total row per person, so you don't need grouping, it all goes in the Detail band. Your Phones table should probably be renamed to something like Contacts.
SELECT ; LName ; , FName ; , GetContactInfo( cID, "Home" ) AS Contact1 ; , GetContactInfo( cID, "Office" ) AS Contact2 ; , ... ; FROM People ; ... FUNCTION GetContactInfo( tcID, tcContactType ) LOCAL ; lcRetVal SELECT ; Phone ; FROM Phones ; WHERE Phones.cID == tcID ; AND Phones.Type == tcContactType ; ... IF _TALLY > 0 lcRetVal = ... ELSE lcRetVal = "" ENDIF RETURN lcRetValOne problem with this approach is if you add even one Contact type, you have to add a column to your main SELECT. Then you have to remember to add another Contact column in your report.
SELECT ; LName ; , FName ; , CAST( GetContactInfo( cID ) AS M ) AS ContactInfo ; , ... ; FROM People ; ... FUNCTION GetContactInfo( tcID ) * This function gets all the Contact info for a single Person and formats it in * a character string, with CRLFs if desired RETURN SomeCharStringWith this second approach, your report contains just a single field to hold the memo so the report doesn't have to be changed later. You just have to update the GetContactInfo() function if you add types.
Person Info (group) Home Office Cell E-mail ...