Crystal Reports MVVM Data Source

这一生的挚爱 提交于 2020-01-15 12:49:07

问题


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.



来源:https://stackoverflow.com/questions/9767923/crystal-reports-mvvm-data-source

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!