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
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
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
You have accomplished a break at the 25th record, but I am afraid that doesn't help to get the LAST value of "Lastname" to print at the top of the page. Yours will still print the first value of each LastName on the page. Ken Hamady
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.