Please help! Section Header w Count of Unique

P

PK

Sorry for the re-post but I am really stuped here and could use some help.

I have a report with several groupings - two of which are Category and
ProjID. I need the HEADER section for Category to have a UNIQUE count of
ProjID.

Here is what I have so far, which WORKS FINE for the Category footer, but
when i move it to the header it doesnt work.

text control in ProjID sort footer:
name: ProjCounter
control source: =1
running sum: Over Group

text control in Category footer
name: SectionProjCounter
control source: =[ProjCounter]
running sum: No

SectionProjCounter works FINE in the footer, but not in the header - Please
Help!
 
M

Marshall Barton

PK said:
Sorry for the re-post but I am really stuped here and could use some help.

I have a report with several groupings - two of which are Category and
ProjID. I need the HEADER section for Category to have a UNIQUE count of
ProjID.

Here is what I have so far, which WORKS FINE for the Category footer, but
when i move it to the header it doesnt work.

text control in ProjID sort footer:
name: ProjCounter
control source: =1
running sum: Over Group

text control in Category footer
name: SectionProjCounter
control source: =[ProjCounter]
running sum: No


You can not reasonable expect to display a value before it
has been calculated.

If this is really important, then there is a more than a
little roundabout way to do it. The general idea is to
force Access to process the report twice by using a text box
with Pages in its expression. Because Access must format
the entire report to figure out how many pages are in the
report and then format it a second time to plug that value
into the text box, you can use that to do something similar
in your code. The idea is nearly the same as adding a table
of contents to a report.

Use a collection (or table or array) to store the group
name and count from the footer the first time through the
report and then retrieve the stored count from the
collection and stuff it into the header the second time
around.
 

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