Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i work on C# desktop application in that i have two table like this way.

Table Name : Bill

SQL
Pid	Amount
-------------------------
1	2000
2	3600
3	500


here pid is row id.

Table Name : BillData

SQL
Pid	ProductId	Amount
---------------------------------
1	101	      1000
1	102	      500
1	103	      500
2	105	      1600
2	101	      2000
3	109	      500


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
Posted
Comments
Anh Nguyen Trong 6-Sep-13 6:27am    
I think you write the query and use that query in report.

 
Share this answer
 
SQL
SELECT     Bill.Pid, BillData.Amount, BillData.ProductID
FROM         Bill INNER JOIN
                      BillData ON Bill.Pid = BillData.Pid
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900