简体   繁体   English

如何在C#中将两个表数据添加到Crystal Report中

[英]How to add two tables data into a Crystal Report in c#

I am using Access database as datasource. 我正在使用Access数据库作为数据源。 There are two tables in my database . 我的数据库中有两个表。 One is Product Table and Invoice table. 一种是产品表和发票表。 Invoice table has a productId which is actually Id in the product table. 发票表中有一个productId,它实际上是产品表中的ID。 I want to show the product name instead of id dynamicaly according my runtime query. 我想根据我的运行时查询动态显示产品名称而不是ID。 How can i do in c# ? 我该如何在C#中进行操作? Any one have suggestions Please 任何人都有建议请

Create a view between Product and Invoice then bind the view to the Crystal Report. 在产品和发票之间创建一个视图,然后将该视图绑定到Crystal Report。 Depending on your needs you don't need to write any extra code to do this. 根据您的需要,您无需编写任何其他代码即可执行此操作。

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

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