If I try to use fields from more than one table in dataset the report hangs.
I have three tables Customer, Orders, orderdetails. I create a dataset in my project with the three tables with relations:
Customers----> Orders ----> Orderdetails.
I create a report with the wizard that contains the three tables linked in the same manner as the relations. grouped by Orders.OrderId and ordered by this field.
I have a form that executes that has the crystalviewer and the follwing code in the load event.
When I execute the code if I have fields from more than one of the tables the form hangs.Code:Dim connstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _ "C:\ReynerioData\Nwind\nwind.mdb" Dim conn As OleDbConnection = New OleDbConnection(connstring) Dim oledbadap As OleDbDataAdapter = New OleDbDataAdapter("Select * from Customers", conn) Dim oledbAdapOrdr As OleDbDataAdapter = New OleDbDataAdapter("SELECT * FROM Orders", conn) Dim oledbAdapOrdrDetails As OleDbDataAdapter = New OleDbDataAdapter("Select * from [Order Details]", conn) 'Dim oledbAdapCustCat As OleDbDataAdapter = New OleDbDataAdapter("Select * from CustCat", conn) Dim NwindDataset1 As New nwindDataSet oledbadap.Fill(NwindDataSet1.Customers) oledbAdapOrdr.Fill(NwindDataset1.Orders) oledbAdapOrdrDetails.Fill(NwindDataset1.Order_Details) Dim rpt As New CrystalReport3 rpt.SetDataSource(NwindDataset1) Me.CrystalReportViewer1.ReportSource = rpt
It works fine if I use ado but not if I use ado.net.
It is using OLEdb (Access).
Any suggestions?
BillyBoyPR
PS Do you all use the crystal for reporting in VB or do you think there is something better out there?




Reply With Quote