Search code examples
c#crystal-reports-2010

How to show data from 3 tables in crystal report using c#


I need to show data on crystal report, my tables are as below

ClientServiceMaster (ServiceNo, ComplainDate, AttainDate, Counter)

ServiceDetail(ServiceNo, Problem, Reason, Action)

ReplacementDetail (ServiceNo, ItemNo, Qty)

Here ClientServiceMaster Data is only once, so I have kept that in Page Header But there would be more then one records for ServiceDetail as well as ReplacementDetail, I want to show each rows of these both tables.

Kindly Help me in which section I need to add these tables and how to write code

Khilen


Solution

  • You should use sub reports. You can use separate queries with datasets with the relevant data.

    Here are some samples.. Hope you'll find something...

    http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-subreports.htm http://www.dotnetspider.com/resources/43691-How-create-sub-reports-crystal-report.aspx