View Full Version : Any expressions to count number of groups in report header?


pongthai
08-25-2004, 08:20 PM
Hi,

I have no problem counting all records in the whole report using =Count(*) in the text box on my report header. But one of my reports has grouping activated. How can I count number of groups in it?

(note: I don't prefer placing it on report footer - need it to be on the first page)


Thanks,
Pongthai

WayneRyan
08-26-2004, 11:20 AM
pongthai,

If you need it on the first page, you're gonna have to:

1) Use DCount function calls to populate some unbound controls on the
header.

2) Possibly use the report events to manually do the counts, but I can't
remember the order in which they fire.

I'd use option 1.

Wayne

pongthai
08-29-2004, 11:02 PM
Wayne,

Thanks for the answer. Could you, or anyone, explain how can I use DCount() function call to count the distinct values on the table? Do I need to create another query to select distinct values before proceeding with DCount in this report?

Thanks & Regards,
Pongthai