Muh*_*fam 3 datasource crystal-reports crystal-reports-2010
我正在处理示例图像中的crystal report类似内容。它有一些有限的属性和一些会重复的属性。就像每个项目和整个发票一样。我正在尝试使用两个不同的表,一个用于重复元素,另一个用于单个时间元素。item id will be repeatedinvoice id will be only one
我在设置datasource of the crystal report. 我如何设置它以便它可以为repeated elements from datatable one和获取数据other from datatable two。或者,如果您知道解决此类问题的任何其他方法,请分享。
问题解决了。我们可以根据需要使用任意数量的数据源。我们只需要通过数据库专家选项添加它们。除了提供实际数据外,我们还可以这样做:
objRpt.Database.Tables[0].SetDataSource(list_of_objects_of_data_sources);
objRpt.Database.Tables[1].SetDataSource(list_of_objects_of_data_sources2);
Run Code Online (Sandbox Code Playgroud)
这也表明我们可以通过对象列表而不是数据表向水晶报告提供数据。我们只需要将数据库专家中的引用设置为那些类对象。像图中