I have a report in which the user can select different filters to apply to a dataset.

At design time, I don't know what filters the user will apply, so I grab the whole dataset.

For instance, if the user wants to see contacts that live in Chicago, I first grab all contacts...

```
IList<contact> contacts = db.contacts.ToList();

```

then I check the form collection for filters and apply them...

```
contacts = contacts.Where(t => t.state == form["state"]).ToList();

```

The issue is that getting all contacts to filter down from is resource intensive. Is there a way to wait to retrieve the contacts from the db until I have all the parameters for the query?

I realize I'm doing this wrong, but I need to know the correct way to approach this.