Detail counter in descending order

R

Reid Kell

I submitted the following recently about numbering report items in
descending order. I thought Fred had solved my problem, but I need to
determine the total number of records in the *detail* section of each group,
not the entire report as Count(*) supplies. Any ideas?

Reid Kell
How can I display a counter in *descending* order in the detail section of a
report? When there's five items, I need to display 5..4..3..2..1, not the
other way around (which is easy). Is there an easy way to accomplish this?
I'm not willing to do a Count query each time to figure it out. Thanks.
Reid,
Add an unbound control to the report.
Set it's control source to
=1
Set it's running sum property to Over All
Name this control RecCount.
You can make itr not visible if you want.

Add another unbound control.
Set it's Control Source to
= 5 - [RecCount]

If the start number (5) is dependent upon the actual number of records
in the report, use:
=Count(*)-[RecCount]
 
F

Fredg

Reid,
Make a few changes.
In the Group Header add an unbound control.
Control source
=Count("*") + 1
Running sum = No
Name this 'CountGroup'

In the Detail section, add an unbound control.
Set it's Control Source to
=[CountGroup] - [RecCount]
Running Sum = No.

[RecCount] is the previous Running count control I gave you.

5 records in a group will count down:
5 4 3 2 1

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Reid Kell said:
I submitted the following recently about numbering report items in
descending order. I thought Fred had solved my problem, but I need to
determine the total number of records in the *detail* section of each group,
not the entire report as Count(*) supplies. Any ideas?

Reid Kell
How can I display a counter in *descending* order in the detail section
of
a
report? When there's five items, I need to display 5..4..3..2..1, not the
other way around (which is easy). Is there an easy way to accomplish this?
I'm not willing to do a Count query each time to figure it out. Thanks.
Reid,
Add an unbound control to the report.
Set it's control source to
=1
Set it's running sum property to Over All
Name this control RecCount.
You can make itr not visible if you want.

Add another unbound control.
Set it's Control Source to
= 5 - [RecCount]

If the start number (5) is dependent upon the actual number of records
in the report, use:
=Count(*)-[RecCount]
 
R

Reid Kell

Perfect! Fred, you're the man! I'm left a little confused, however, as to
why the statement Count(*) in the group header counts the number of records
in the group only, whereas the same statement in the detail section counts
all records in the report's recordset. Shouldn't the Count(*) statement in
the detail section apply only to the current group and generate the same
result as in the header?

--
Reid Kell
Lockheed-Martin
(e-mail address removed)


Fredg said:
Reid,
Make a few changes.
In the Group Header add an unbound control.
Control source
=Count("*") + 1
Running sum = No
Name this 'CountGroup'

In the Detail section, add an unbound control.
Set it's Control Source to
=[CountGroup] - [RecCount]
Running Sum = No.

[RecCount] is the previous Running count control I gave you.

5 records in a group will count down:
5 4 3 2 1

--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.


Reid Kell said:
I submitted the following recently about numbering report items in
descending order. I thought Fred had solved my problem, but I need to
determine the total number of records in the *detail* section of each group,
not the entire report as Count(*) supplies. Any ideas?

Reid Kell
section
of
a
report? When there's five items, I need to display 5..4..3..2..1, not the
other way around (which is easy). Is there an easy way to accomplish this?
I'm not willing to do a Count query each time to figure it out. Thanks.
Reid,
Add an unbound control to the report.
Set it's control source to
=1
Set it's running sum property to Over All
Name this control RecCount.
You can make itr not visible if you want.

Add another unbound control.
Set it's Control Source to
= 5 - [RecCount]

If the start number (5) is dependent upon the actual number of records
in the report, use:
=Count(*)-[RecCount]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top