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!

Phone Directory Creation

Status
Not open for further replies.

jeanniek

Technical User
Feb 12, 2001
3
CA
I would like to add to the page header the 'first' and 'last' entry of a field for every page (similar to a phone book design). I know how to do it in MS Access, but I am having problems in Crystal Reports. Thanks.
 
You can do the first easily by placing the field in the page header. Unfortunately you can't do the last per page easily, if at all. You could find the maximum string in each group, but unless you can get each page to represent one group, I don't know how you can get this behavior to happen. I am going to listen in to this thread to see if someone else has an idea. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Sorry Ken - I came to the same conclusion!

First name on the page is easy - just place the datafield in the page header but I've tried numerous ways to get a last name on the page and not found a way to get Crystal to do this yet apart from a rough and ready way which relies upon an embedded subreport with the record pointer set 50 or so records on up the data in the sub! David C. Monks
david.monks@chase-international.com
Accredited Seagate Enterprise Partner
 
This is a solution if you want to have a certain definite number of records on each page
(I used 25 Records on each page).

1)
Delete the Last name from the report.


2)
Create a Last Name Fromula:
Go to main menu
Insert
Formula field
New
Name the New formula as: Last Name
When Formula window opens double click on the last name field.
In my case I got {xfre_entity.name_1}

3)
Insert the Last Name Formula at:
the page heading,
and at the Last name spot on the detailed record.

4)
Right click on the Last Name Formula at the page heading.
Format section
Check Suppress and click on the formula (X2 icon) icon where you see the X2 icon
Copy this formula:
RecordNumber<>1 and
Remainder(RecordNumber,25) = 0

5)
Detail line :
Format section
Check New page after
Write this formula:
Remainder(RecordNumber,25) = 0


Kamal Khalil
Sr. Client Technical Analyst
kkhalil@Houston.ds.adp.com
 
Kamal,

You have accomplished a break at the 25th record, but I am afraid that doesn't help to get the LAST value of &quot;Lastname&quot; to print at the top of the page. Yours will still print the first value of each LastName on the page. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top