Crystal Report on basis of Dataset having Multiple Tables
-
hi I want to use the crystal report in my application on the basis of dataset. I have done it with dataset having single table but having this error with more than one table : "Query Engine Error" Here is the Code: Dim DS As New DataSet Dim Cnn As New SqlClient.SqlConnection Dim DA As New SqlClient.SqlDataAdapter Cnn.ConnectionString = "data source=sofsrv02\development;" _ & "initial catalog=Northwind;persist security info=False;" _ & "user id=sawd=;workstation id=alirazaooling=false;packet size=4096" Cnn.Open() DA.SelectCommand = New SqlClient.SqlCommand("Select A.PRODUCTID,A.PRODUCTNAME,B.SUPPLIERID,B.COMPANYNAME from SUPPLIERS B,PRODUCTS A WHERE A.SUPPLIERID=B.SUPPLIERID", Cnn) DA.Fill(DS) Dim oRpt As CrystalReport1 ' create new report object oRpt = New CrystalReport1 ' create new instance of the report object oRpt.SetDataSource(DS) ' set the reports data source CrystalReportViewer1.ReportSource = oRpt ' set the viewers report source It executes all the code but finally give me error. Kindly Solve this Problem Regards Ali
-
hi I want to use the crystal report in my application on the basis of dataset. I have done it with dataset having single table but having this error with more than one table : "Query Engine Error" Here is the Code: Dim DS As New DataSet Dim Cnn As New SqlClient.SqlConnection Dim DA As New SqlClient.SqlDataAdapter Cnn.ConnectionString = "data source=sofsrv02\development;" _ & "initial catalog=Northwind;persist security info=False;" _ & "user id=sawd=;workstation id=alirazaooling=false;packet size=4096" Cnn.Open() DA.SelectCommand = New SqlClient.SqlCommand("Select A.PRODUCTID,A.PRODUCTNAME,B.SUPPLIERID,B.COMPANYNAME from SUPPLIERS B,PRODUCTS A WHERE A.SUPPLIERID=B.SUPPLIERID", Cnn) DA.Fill(DS) Dim oRpt As CrystalReport1 ' create new report object oRpt = New CrystalReport1 ' create new instance of the report object oRpt.SetDataSource(DS) ' set the reports data source CrystalReportViewer1.ReportSource = oRpt ' set the viewers report source It executes all the code but finally give me error. Kindly Solve this Problem Regards Ali
This is the complete error. Error in File C:\DOCUME~1\ALIRAZ~1\ASPNET\LOCALS~1\Temp\temp_2d2350fe-39ee-4e43-a51c-2503df13defd.rpt: Query Engine Error Regards; ALI