Using a list in my ObjectDataSource on my report for the DataSource of a Telerik Chart in report

本小妞迷上赌 提交于 2019-12-10 11:54:47

问题


Hey there I'm trying to use a list (Loans) within my ObjectDataSource (objectDataSource1) object on a report, as the DataSource for my Telerik chart on the same report. The majority of the tutorials I have looked at all show the report querying their database with a SQL string. I feel I'm over looking something silly. I've also posted on Telerik and haven't got a response quite yet.

What I want to do is something like this:

chart1.DataSource = objectDataSource1.Loans;

Or to be able to just set it at run time, as I'm doing with the other reporting tools on the report:

[=Fields.CurrentModel.Loans]

Is it possible to use a list within an ObjectDataSource as the DataSource for my Chart? Hopefully this is clear. Thanks a ton in advance!


回答1:


So after looking a bit deeper into it, I found this post on telerik's forums:

http://www.telerik.com/community/forums/reporting/telerik-reporting/build-chart-with-object-data-source.aspx

The charts themselves have "Bindings" where you can set up an expression where you can set the chart's DataSource property to a list on your Object Data source.

Going to the chart's Properties column and click the ellipse button under Bindings:

And from there just set the Property Path and the Expression and you're golden



来源:https://stackoverflow.com/questions/14485241/using-a-list-in-my-objectdatasource-on-my-report-for-the-datasource-of-a-telerik

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