I use asp.net dynamic data to show the contents of a few tables that I have in a sql server database and it's pretty cool. Apart from that, I'm trying to do one other thing.
say there is a table
CustomerComplaints
- some fields
- CustomerName
- ComplaintType
- ComplaintDate
- other fields
I want to show a view with Top Complaining Customer
so I created a view
select CustomerName, count(*) ComplaintCount from CustomerComplaints group by CustomerName
but I also want to be able to pass in an optional AfterDate and BeforeDate to filter on ComplaintDate to do my Top Compalining Customer view.
What's a good way to go about to do this without creating a page very specific for this problem?
Thanks