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

Display the number of Groups in the Report Header

Status
Not open for further replies.

JEMorrison

Technical User
Sep 10, 2004
19
US
We have created a report in CR8.0 which lists members by Member Number. Because the selection criteria is very complex and requires the use of many linked tables, the only consistent and efficient (report must be generated in a matter of minutes) way to insure that the member appeared on the list only once for each given condition (with all member condition lines grouped together) was to group by Member Number and print each detail line from the group footer (suppressing the Details and Group Header sections).
This permitted us to use the Group Number special field to number each line of the report which is a requirement. However, it has prevented us from meeting another requirement: printing the total number of members listed, at the top of only the first page of the report (which can be hundreds of pages long). Placing the Group Number field in the page header gives a result of "1", regardless of the number of lines (groups) in the report. All attempts at using Running Totals and Summary Totals have produced wildly different values for the same reason that we are using the Group Footer print method to produce detail lines.
Is there some way to get the last group number to display in the report header?

Thank you for your help -- Jamie

 
When I attempt to include distinctcount({table.groupfield}) in a formula, I get a "This field name is not known." error. In what way am I using this incorrectly?

-Jamie
 
Replace the {table.groupfield} with the name of the field you grouped on.

-k
 

Unfortunately, this has the same issue we ran into when we used running totals. For my current test distinctcount({table.groupfield}) gives a value of 32 (the number of records in the suppressed Details section), while the actual number of records printed on the report is only 19. For some reason "distinct" is not working on the Member Number field. Nor does it work correctly on the Member Name field (the only other truely "unique" field in the list). although it cuts the count down to 28, that's still not the 19 that it should be.
That's why this is so frustrating to me. Nothing seems to have any logic or consistency to it.

-Jamie
 
It's probably working, you probably have that many.

Perhaps there are mis-spellings in the name, or additional spaces in some names, but distinctcount works.

If you tell it to do a distinctcount against a numeric ID field and it gets it wrong, I'd like to see that report as I and millions of others use distinctcount often.

Try using a trim({table.field}) as the basis for the distinctcount.

Anyway, I suspect that you have some discovery yet to do about your data.

-k
 
If you must display this in your report header, then you will probably need to save your report as a subreport in which you place groupnumber in the subreport report footer. Place the (unlinked) subreport in the report header.

-LB

 
After a heated "discussion" with all of the principals, we decided to take a performance hit and revamp the report. It's slower but synapsevampire's method using distinctcount({table.groupfield}) works, now.
Thank you for the help. A few people who weren't listening before, have openned their ears because of this.

--Jamie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top