Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listing people horizontally on a report separated by a comma

Status
Not open for further replies.

maggielady

Technical User
Jan 3, 2003
60
US
I need some assistance in getting children to list horizontally on a report and they need to be separated by a comma if there is more than one child. Could someone help me please??
 
Not sure if this is what you want but if you go into the Format Section details and check the box Format with multiple columns, a new tab appears called layout. Set the width and then choose Across then Down. If you want commas you could create a formula [Name_Field]+",".

That is the simple way. You may have to ask someone more expert than me if it's not right. :) Learn something new every day *:->*
AyJayEl
 

Hi

If I understand you correctly what you need is to combine a fields value in multiple rows to a single row in the record.

If thats the case you can use the following solution

1) Create a group in the report using the common field
2) In the report header insert the first formula, in the detail section formula 2 and group footer formula 3

3) Suppress the detail section and place the fields in the group footer

Formula 1
--------

whileprintingrecords;
shared stringvar child;
child:=''

Formula2
---------

whileprintingrecords;
shared stringvar child;
if child='' then child:={FieldName} else child:=child+{FieldName}

Formula3
----------

whileprintingrecords;
shared stringvar child;
child

Hope this help you.

Regards
Krishna Kumar
 
This technique is described in faq149-243, formula #16.

I have also added code to make sure that the string doesn't go over the 254 limit in CR Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top