Click here to Skip to main content
13,085,292 members (55,588 online)
Rate this:
Please Sign up or sign in to vote.
I want to create Crystal Report on with C#

I have two tables 'Sales,TempSales'

In my table has following
Billno  Billdate  BillAmount Tax TPTCharge ..........NetTotal
E001     3/4/2012   3000      1    1.................3500
E002     4/4/2012    2000     2    2.................2200

Billno  Item     Qty Rate Amount
E001    kova       1  20    20
E001    kalakandu  2  30  60
E002     Paneer    1   40  40
E002      cheese    1   50  50

I want to get report from Both tables

So i give the following code but it is not working

SqlDataAdapter da = new SqlDataAdapter("Select T1.Billno,T1.Billdate,T1.BillAmount,T1.TPTCharge,T1.LBCharge,T1.Nettotal,T1.Tax,T1.Discount,T1.CName,T1.ONo,T1.Vno,T2.Item,T2.qty,T2.Rate,T2.Rate_Typ,T2.Amount,T2.Tax from Sales T1,Tempsales T2 where T1.Billno=T2.Billno and T2.Billno=T1.Billno and T1.Billdate>='" + DateTime.Parse(TextBox1.Text).ToString("MM/dd/yyyy") +"' and T1.Billdate<='" + DateTime.Parse(TextBox2.Text).ToString("MM/dd/yyyy") +"' order By T1.Billno",;

The report is display all the records in second table

I give the following code to generate report
ReportDocument rptdoc = new ReportDocument();

Please anybody help for this problem
Posted 5-Apr-12 0:00am
Updated 5-Apr-12 0:04am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 5 Apr 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100