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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sort Horizontally

Status
Not open for further replies.

jvolden

IS-IT--Management
Jan 26, 2005
77
US
I am using Crysal reports 11 and would like to know if there is a way to sort data horizontally. The normal sort will sort dates in the list vertically, but I would like them to all show up in a row and be sorted.

Examples:
Normal Sort: PH
D 7/1
D 7/2
D 7/3
PF
What I want:
PH
D 7/1 , 7/2, 7/3
PF

Thank you for your help.
 
This isn't really a sort issue. You first need to sort by the date field and then create these formulas:

//{@accum} to be placed in the detail section:
whileprintingrecords;
stringvar dates := dates + totext({table.date},"M/d")+", ";

Then in the report footer add this formula:

//{@display}:
whileprintingrecords;
stringvar dates;
left(dates,len(dates)-2);

Then suppress the detail section.

If you want to do this at the group level, then put {@display} in the group footer, and add a reset formula into the group header:

//{@reset}:
whileprintingrecords;
stringvar dates := "";

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top