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

Sorting birthdays 1

Status
Not open for further replies.

xxing

Programmer
Feb 17, 2004
61
NZ
I use crystal Report 8.5 and use SQL Server 2000

I have a problem regarding the sorting of birthdays. I have four fields in our database. They are:

MaleName, MaleBirthday, FemaleName, FemaleBirthday

The report displays the information as follows:

Male Birthdays

John Smith January 1, 1945
Peter Brown February 3, 1946
Matthew Scott March 5, 1940

Using a subreport the female information is displayed after the male birthdays:

Female Birthdays

Sally Bernstein January 5 1947
Mary Wong February 6 1948
Kay Lee March 6, 1952

I would like to change the report so the male and female information is all together:

John Smith January 1, 1945
Sally Bernstein January 5, 1947
Peter Brown February 3, 1946
Mary Wong February 6, 1952
Matthew Scott March 5, 1940
Kay Lee March 6, 1952

The sorting order is on the birthdays fields. Months, then day, then year.

Can anyone help. Thank you?
 
You could try the creating a formula {@sort}:

if isnull({table.malebirthday}) then
{table.femalebirthday} else {table.malebirthday}

Use this as your sort field (report->sort records). Place {table.malename} and {table.malebirthday} in detail_a, and {table.femalename} and {table.femalebirthday} in detail_b. Then go to the section expert and highlight detail_a->check "Underlay following sections".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top