views:

10

answers:

0

Using WPF and MVVM, we have a lot of very useful ViewModels and business objects for reporting. When designing a specific report (so far they're very simple) I'll add the BO/VM as a data source so the report can pull the properties from there instead of having to create and maintain an actual DataTable of properties for each BO/VM.

The problem lies that whenever we load a report in the UI, the report then takes it upon itself to evaluate every property on the BO or VMs it's using as a datasource (even if it's not using that particular property). This is bad because we're using lazy loading in quite a few places to make server calls.

Is there anyway to stop this behavior of evaluating every property on the datasource without having to create more VMs just for reporting with just the properties we want or worse yet maintaining a DataTable for every BO in use by the report? It'd be amazing if there were an attribute we could put on the existing BO/VM properties we don't want evaluated so it'd just skip them...

Thanks!