如何将xtrareport数据源(entityframwork)与先前的查询绑定 [英] How to bind xtrareport datasource (entityframwork) with the previous query
问题描述
i有一个表单,其中包含使用EntityFramwork Query的Gridview show VIEW结果。
如何将Xtrareport数据源(EntityFramwork)与之前的查询绑定,以便用户不要我需要重新加载数据并重新输入参数值。
我尝试过:
i在加载报告之前使用此代码自定义EF ConnectionParameters:
i have a form that contains a Gridview show VIEW result using EntityFramwork Query.
how to bind Xtrareport datasource (EntityFramwork) with the previous query so user don't need to reload the data and re enter the parameters value.
What I have tried:
i use this code to customize EF ConnectionParameters before loading the report:
((EFDataSource)report.DataSource).ConnectionParameters.ConnectionString = conn;
(EFDataSource)report.DataSource = query;
The left-hand side of an assignment must be a variable, property or indexer
推荐答案
... = query.ToList();
... = query.ToList();
使用DataSource属性为报表指定数据源。支持多种数据源类型,包括.NET数据提供程序,列表(实现System.Collections.IList,System.ComponentModel.ITypedList或System.ComponentModel.IBindingList接口)和XML数据源。要了解更多信息,请参阅报告数据绑定快速指南。
Use the DataSource property to specify a data source for your report. Multiple data source types are supported, including .NET data providers, lists (implementing the System.Collections.IList, System.ComponentModel.ITypedList, or System.ComponentModel.IBindingList interfaces), and XML data sources. To learn more, refer to Quick Guide to Report Data Binding.
这篇关于如何将xtrareport数据源(entityframwork)与先前的查询绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!