简体   繁体   English

Visual Studio 2008的Crystal Reports:报表和子报表中的数据源混合吗?

[英]Crystal Reports for Visual Studio 2008: Mix of data sources in Report and subreport?

I have a winforms applications that does some reporting using Crystal Reports for Visual Studio 2008. I'm facing the situation where I have to add new data to one of those reports, that uses odbc as its data source. 我有一个winforms应用程序,该应用程序使用Visual Studio 2008的Crystal Reports进行某些报告。我面临这样的情况,我必须将新数据添加到其中一个使用odbc作为其数据源的报告中。 Since the new data I have to add is quite complex to process with CR Table Designer (odbc) I'm thinking on doing all the processing by code and pass the output using a DataSet. 由于必须使用CR Table Designer(odbc)处理的新数据非常复杂,因此我正在考虑通过代码进行所有处理,并使用DataSet传递输出。 Also, I don't want to migrate the whole report to DataSets as data source. 另外,我也不想将整个报告迁移到数据集作为数据源。 I know I can't use Odbc and DataSet on the same report but can I do this on a subreport?. 我知道我不能在同一报表上使用Odbc和DataSet,但是可以在子报表上执行此操作吗? I mean, keep the main report as odbc and add a subreport with DataSets as its source? 我的意思是,将主报表保留为odbc并添加一个以DataSets为源的子报表?

Thanks. 谢谢。

I believe the answer is that yes, you can. 我相信答案是可以的。 We provide independent datasets to subreports all of the time using the report's Database.Tables([SubReportTableName]).SetDataSource() method. 我们使用报表的Database.Tables([SubReportTableName]).SetDataSource()方法提供始终独立的数据集来子报表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM