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

Alphabetical Grouping-like phone book

Status
Not open for further replies.

cateyes

Programmer
Jun 14, 2002
9
0
0
CY
I have never written a CR before and I am totally clueless....

I am trying to prepare a simple list alphabetized by last name. With a new page for each letter of the alphabet. (Similar to a phone book) with the Alphabetic letter at the top of the appropriate page as the page header.

Using Crystal reports 8.5...
I inserted a new group and through the group options I selected the last name as the group field

I chose group options, Use formula as Group Name and used the formula mid(groupname,1,1)to supposedly group on A,B, C etc. It didn't work very well because I had as many group A's as I had entries beginning with A and each group had a group header "A".

Then I dragged the resulting group header ("A" for example) into the page header.

The result being I do get the correct Page headers (for example "A" )but I want a new page when the last name uses the next letter of the alphabet.

Can anyone tell me how to do this?

Thanks.
 
Create a formula:

Left({LastName},1)

Then insert a count summary for this formula, and suppress the group footer and format it as "new page after". Setup your sorting within the group, and you are done.

Software Support for Macola, Crystal Reports and Goldmine
714-348-0964
dgilsdorf@mchsi.com
 
Thank you for your response. I tried to follow your instructions, but I have made a mistake somewhere.

I created the formula with no problem. Then I used insert summary for the count summary. I followed the remaining instructions. The result is that I have one last name on each page.

I am not sure where I made my mistake.

Thanks for your help.
cateyes
 
Sounds like you're still grouping on the whole last name, with the New Page After switched on.

Are you sure you're grouping on dgillz's formula up there?

Naith
 
Naith,
You were absolutely correct! I didn't use the formula properly for the grouping. I have since corrected it and it works like a dream.
Thank you both - my first CR is a success!

Cateyes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top