I have an MVVM application and would like to add Crystal Reports. I have a ViewModel of PatientList and would Like to Bind the Report to an Observable collection of Patients in the ViewModel. the Collection is not appearing in the data sources window.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I guess you are refering to Crystal-Reports datasource window right?
If so - I think you will never find the ObservableCollection there (and I don't know if you can have CR observe the collection) but on the document-class in Crystal-Report you should have something like SetDatasource
(I don't have the newest version anymore and CR changed this from time to time) - in the last version I know you had to cast to IEnumerable<...>
in some cases (DataTable
) so look out for this too.