水晶报告使用两个表数据。 [英] crystal report using Two table data.
本文介绍了水晶报告使用两个表数据。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在C#桌面应用程序上工作,因为我有两个这样的表格。
表名:比尔
i work on C# desktop application in that i have two table like this way.
Table Name : Bill
Pid Amount
-------------------------
1 2000
2 3600
3 500
这里pid是行ID。
表名: BillData
here pid is row id.
Table Name : BillData
Pid ProductId Amount
---------------------------------
1 101 1000
1 102 500
1 103 500
2 105 1600
2 101 2000
3 109 500
这里pid是比尔表 pid的外键
现在我想在水晶报告中制作账单,因为我想从这两张表中获得全部账单数据。
i想要Pid,金额以及我想要的所有产品和与pid相关的数量。
i我第一次制作水晶报告。那么如何加入两个表以及如何显示它?请帮助
Here pid is foreign key of Bill table pid
Now i want to make bill in crystal report in that i want whole bill data from this two table.
i want Pid,amount as well as i want all productid and amount which related with pid.
i am make crystal report first time. so how to join two table and how to display it ? please help
推荐答案
在这里你去
C#来自多个表的Crystal Reports [ ^ ]
SELECT Bill.Pid, BillData.Amount, BillData.ProductID
FROM Bill INNER JOIN
BillData ON Bill.Pid = BillData.Pid
这篇关于水晶报告使用两个表数据。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文