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

First Record in group

Status
Not open for further replies.

Smithsc

MIS
Apr 20, 2007
143
GB
Is there any way of indicating the first record in a group. I know there is a 'ONFIRSTRECORD' function but this only works for the whole report.
The data looks a bit like:

AA10 112456 1 08/06/2009 Capital -130,000.00 -130,000.00 *
AA10 112456 1 08/06/2009 Rental 10,000.00 -120,000.00

AA10 112456 1 08/07/2009 Interest - 200.00 -120,200.00 *
AA10 112456 1 08/07/2009 Pto - 150.00 -120,350.00

AA10 112456 1 08/08/2009 Interest - 200.00 -120,550.00 *
AA10 112456 1 08/08/2009 Pto - 150.00 -120,700.00

I want to be able to calculate the first record of each group (*)

Any ideas would be appreciated.

Thanks

 
There is nothing in your post to indicate what makes the first record "first". Is this based on a datetime? On some other sequential record? Data can always be sorted differently.

-LB
 
I usually use a Numbervar and add 1 when printing the detail and clear the numbervar on Group change.

If you do have a field that indicate the first you could try Datefield <> Previous(datefield) then "*
 
Building on what VKZIMM says, you could use a formula like this:

if onfirstrecord or
{table.groupfield} <> previous({table.groupfield}) then
"*"

I can't tell what your groupfield is. However, again this would be sensitive to how you were sorting, which was why I was asking what determines your first field.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top