The report has already used a query to bring out the details, that means every records even it is the same day. In the page footer I need to count the number of unique date. I think it's impossible to have two separate queries in the same report. The other way I can think of is to use subreport. It would be simplier if a function can do the job.