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

Number of records printed in Desceding order

Status
Not open for further replies.

oanion

IS-IT--Management
Jun 18, 2004
55
I’m trying to write a formula that will count the number of records in a file in descending order. For instance if there are 10 records, I will have a field that looks like the following

10
9
8
7
6
5
4
3
2
1

Any ideas?
 
Excuse me for not printing enough information. I'm using Crystal 10
 
Hi,
I'm curious..Why?

Anyway, the total # of records is not 'known' until all the records have been returned and displayed..so assigning a descending number to each record as it comes in from the database may be difficult.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Well, I'm working on a report that will show the total number for days in a month. For instance, the month of June has 30 days. The department who needs the reports needs to see the number of days remaining in a particular month in one column and the actual date in the next column. Therefore I need to show the following:

Remaining Days Date

30 06/01
29 06/02
28 06/03
27 06/04

The want to see a daily status of information and want to know the remaining days in the month left to reach a specific goal.
 
Create two formulas:

//{@reset} to be placed in a group header (if you have groups):
whileprintingrecords;
numbervar cnt := 0;

//{@desccnt}:
whileprintingrecords;
numbervar cnt := cnt + 1;
distinctcount({table.date},{table.groupfield})+1-cnt;

Not sure what your groups are--maybe on date (monthly).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top