Question : Report Group Subtotals and Total

My report has several groups: 1) Division, 2) Document, and 3) Vendor. There are four divisions. Several hundred documents. Several vendors. I need to report the number of unique documents. Everything I've tried counts the number of vendors. How can I report the number of documents? I've used a text control with "=count([documentID])"

Answer : Report Group Subtotals and Total

Here is what you can do:

1) Create a text box in the Document Header section.  Ultimately, you'll set the Visible property to No.  But you might want to leave it to Yes in the beginning so you can see what is going on.
2) Set the Name property of the text box to txtDocumentRunningTotal
3) Set the control source to:    =1
4) Set the Running Sum property to Over Group

5) If you don't have a Division Footer, go to Sorting and Grouping and set the Footer to Yes
6) In the Division Footer Section, create another text box
7) Set the Name property of the text box to txtDocumentTotal
8) Set the control source to: txtDocumentRunningTotal

Leave the second text box visible and you have a count of the total unique Document names per division.

If all you want is the total count of unique documents across the whole report, just make a totals query with just the Document column.  Group it and save the query.  Then add a text field to your report and use the DCount Function ... set the control source to something like this:  =DCount("Document","qryDocuments")

One of the two solutions should work for you.
Random Solutions  
 
programming4us programming4us