Posted on: 10/17/2012 10:18:41 PM | Views : 423

I have been tasked with creating a web based report for our data driven intranet site.  I need a count of persons groupeded with their respective cities.  Being that there is nearly an infinite amount of cities that would show the database, I cant simply create a filter to count those records.  In other words, I need the output to look like this for every person/city match in the DB:
Anchorage: 15
Boston: 200
Charleston: 34
Denver: 12
Springfield: 23
Timbuktu: 1
...
The only way I can think of would be to have one query pull all of the cities in the database with DISTINCT, in one dataset, and then have another query pull all of the persons/cities and run a FOREACH statement or somthing to compare the two records, print the name of the city on the page, and count the matches, repeat next record. 
^^^ Seems like ...

Go to the complete details ...