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!

HELP AGAIN WITH LISTING OF CHILDREN ON ONE LINE

Status
Not open for further replies.

maggielady

Technical User
Jan 3, 2003
60
US
I used a formula that was given on my last thread but what I got was on the first line was the first child's name, on the next line was the first childs name and then a comma and then the second childs name and the next line the first, second ,and third childs names. I need all of them on the same line. What am I doing wrong???? I used the third answer on my first thread Can someone help me please???
 
Post the actual formula you used in your report,

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Sounds like you are accumulating the values into a variable.

You need to suppress the detail (or subgroup) sections where you do the accumulation. Then, create a simple formula that declares and returns the value of the variable and place that formula in the group footer.

hth,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
here is the formula I used:
formula 1---put in the report header
whileprintingrecords;
stringvar chain:="";
numbervar chcnt:=1

formula 2--put in detail section
whileprintingrecords;
stringvar item:={my field name};
stringvar chain;
numbervar chcnt;
if chcnt=1
then(chcnt:=2;chain:=item)
else
if length(chain)+length(item)>254
then chain:=chain else
chain:=chain+ ', ' + item

formula 3-- put in report footer
whileprintingrecords;
stringvar chain
 
So all you can get are 254 characters in a single report, which is less than 20 names, must be a tiny report.

Consider using a Label type of Report (New->Mail Label) and when you get to the point of selecting the type of label try:

Return Address (Avery 5267)

Adjust the Label Height to .2

Change the Printing Direction to Across then Down

This will net 4 across and 50 down resulting in 200 per page - not too shabby, and much more readable.

If you really want a comma separated list, consider a basic report and exporting it to a CSV file, it's much simpler.

Crystal 8.5 and below have the 254 character limitation, so you'd have to build arrays and display them on the fly, which is problematic.

If you really need to do it this way, let me know, I or someone else will provide an example to get you started.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top