count in detail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that I would like to count how many detail records it printed
for each person. I want it to reset each time it prints a persons detail.

Any help would be greatly appreciated.

Sarah
 
Sarah said:
I have a report that I would like to count how many detail records it
printed for each person. I want it to reset each time it prints a
persons detail.

Any help would be greatly appreciated.

Sarah

Add a group section to the report based on the field(s) that define a person
and in the GroupHeader or GroupFooter have a TextBox with...

=Count(*)
 
Presumably you have a group footer in the report for each Person?

If so, you can just add a text box to the group footer section, and give it
these properties:
Control Source =Count("*")
Format General Number
 
Your suggestions worked but I still have one more problem. I am setting the
orderby with a procedure in the event on open. If I setup a sort/grouping it
ignores my orderby. I was trying to use the same report for several sorts.
Maybe my design is way off. Any help would be appreciated.

Sarah
 
I am very sorry for the confussion - I think I better get to my real problem.
I was try to count the details to say if they are greater than 1 don't print
a label again. My detail looks like so:

Namefield Addressfield Emailfield (fields are from Master)
Label1 Label2 Label3
Datefield Eventfied Amountfield (fields
are from Transaction)

If a detail has more than one transaction I don't want it to print the
labels again.
Note: I am using the orderby in the Event onopen.

Thanks,

Sarah
 
If you want to print only one label per person, then create a query to GROUP
BY the person in the Master table. Any fields you need from the transaction
table should be just WHERE or FIRST in the Total row: WHERE if you just want
to select them, and FIRST if you want to print one and don't care which one.

Because the query is suppressing the duplicated values, you can do what you
like in the report.
 
Allen,

Thanks, the grouplevel suggestion, it work great! I have to tell you, I
have posted questions about 12 times on this resourse and I am amazed at how
help ful and quick the responses are. Thanks! I love your help!

Sarah
 
Back
Top