on 05-02-2014 3:16 PM
Hi all
I'm facing a problem with my code.
Dim cr As New CrystalReport1()
Dim newCmd As SqlCommand
Dim conn As SqlConnection
Dim da As New SqlDataAdapter
Dim ds As New DataSet
Dim cr As New CrystalReport1
Dim MyConnectionStr As String = "Data Source=MyDB;Initial catalog=MyCat;Integrated Security=true;" ' providerName=System.data.sqlClient"
conn = New SqlConnection(MyConnectionStr)
Dim cmdText As String
cmdText= " SELECT customer.customer_name, customer.customer_tel, orders.order_stuff_name, orders.order_number" & _
" FROM hesabres.dbo.orders orders inner JOIN hesabres.dbo.customer customer ON orders.order_customer_id=customer.customer_id"
da = New SqlDataAdapter(newCmd)
da.fill(ds)
cr.SetDataSource(ds.Tables(0))
crystalviewer1.ReportSource = cr
conn.Close()
newCmd.Dispose()
if i run the query, let's say it returns 2 rows
I my CR veiwer, it shows 4 rows (duplicates 2 x 2),
if the query returns 3 rows, CR displays 9 rows (3 x 3) and so on 10 (10x10)....
How is it possible??
In my Dataset, the number of rows is always correct!
Do you have any idea?
Thanks in advance.
B.
Which version of the Crystal SDK assemblies are you referencing in your project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would look at upgrading to a more recent version of Crystal for VS - you're on SP2 which is quite old. You can download the latest SP from here: http://scn.sap.com/docs/DOC-7824
While I can't guarantee this will fix the problem, it might help.
-Dell
See this wiki on how to troubleshoot issues with CR and datasets:
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center
Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.