Set Data Source to datatable that only exists in dataset.. not an actual table in database

大憨熊 提交于 2019-12-25 02:38:02

问题


I created a datatable in my dataset (.xsd file) which I fill in code behind. This datatable doesn't correspond to an actual table in sql. When I set this datatable as the data source in crystal I get database logon error.

As a work around I actually create this table in sql for the crystal to work.

Is there a way of doing this without the above work around?


回答1:


If the message is "database logon failed", you can try:

1) Open the RPT file and use the command "Verify Database". Redeploy and test.

2) If your RPT is using more than one datasource (2 XSD files for example), try to merge than into one.

3) Verify if the dataset tables columns have type defined explicitly. If no, define them. Check if the types are the same in the XSD. Dont "mask" type (convert date to string for example).



来源:https://stackoverflow.com/questions/25615022/set-data-source-to-datatable-that-only-exists-in-dataset-not-an-actual-table-i

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