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!

Record number

Status
Not open for further replies.

9569walley

Programmer
Sep 21, 2005
5
0
0
CA
Is there anyway I can count the record(not total records)?

name grade
-------------
phil A
dan B
DEN A
..........
........
........
Here I want to print only DEN
ie here DEN is in record number 3
so is there any formula to count the record number so that I can print the name DEN(I am dealing with more than 1000 records (not 3 records)
if (record number = 3) print name
But how t get the record number?

 
why can you not use
if (name = DEN) print name

If this is not what you are looking for, you need to give more details.
 
I assume you are looking for position, not value. So do a running total. This will be 57 on the 57th line out of 984, whereas a summary total would be 984 from start to end.

Right-click on a field and choose Insert to get a choice of Running Total or Summary. Or else use the Field Explorer, the icon that is a grid-like box, to add running totals.

Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.

Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say. They default to 'Grand Total', but also can be for a group.

Right-click and choose [Format Field] to selectively suppress a field.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top