Click here to Skip to main content
13,048,406 members (148,098 online)
Rate this:
Please Sign up or sign in to vote.
hello everyone...

I m currently using vs2010. In that i want to generate crystal report for invoice.

My database tables are Table 'A' and Table 'B' which are as follows
Table 'A'
invoiceid  | invoicedate | subtotal | tax1  | tax2 | Grand Total
   1          07/13/2012     500.00    VAT    CST      700
   2          09/08/2011     800.00    VAT    Sales    1000

Table 'B'
invoiceid  | invdetid  | itemno | itemname  | qty | rate  | amount
   1            1         1        item A      5     10.0    50.0
   1            2         2        item B      3     5.00    15.00 
   2            3         1        item A      10    12.00   120.00 

so here..i m using dataset in which, i m taking two tables,i.e. Table 'A' and
Table 'B'
and my query in procedure is
select A.invoiceid,A.invoicedate,A.subtotal,A.tax1,A.tax2,A.Grand Total,
 from Table A,Table B
where A.invoiceid=B.invoiceid

so by this query i m getting result by invoice number.

My aspx.cs code is
Con = new SqlConnection(strConnString);
                cmd.CommandText ="TestReport";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Connection = Con;
                adapter = new SqlDataAdapter(cmd);
                ds = new DataSet();
                CrystalReportViewer1.ReportSource = rptDoc;

here i m getting data in dataset ..but while displaying it is showing no data on report..

please help..

Thanks in advance
Posted 12-Jul-12 20:14pm
Updated 12-Jul-12 23:43pm
Sandeep Mewara 13-Jul-12 2:50am
You got one query in SP and you are filling dataset twice using adapter, can you share it why?

Further, did you check if the data is returned and filled in dataset before assigning to reports? DEBUGGED it?
Kuldeep B 11-Dec-12 1:45am
Use two datasets and then use Merge methode..
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

im also having the same query please someone help me.....!!!!!!pls
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You need to write your query in command of ur design report page for the fields that you display in report. for more you can refer below links:

Step by Step Creation of Crystal Report using its Features Group, Graph, Cross-Tab and Sub Report,

Generate a Report using Crystal Reports in Visual Studio 2010

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 | Mobile
Web02 | 2.8.170713.1 | Last Updated 14 May 2014
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