In vb.net i want to get the values from three tables and set the datasource to crystal so i am using following coding but the error will occured please help me for this problem
Dim sqlda As New SqlDataAdapter("select Projid,PName,Date,TotalAmount,Status from PDetails1 where Ccode = '" & cuscode & "' union select dcode,dname,Regdate,Totamt,status from domain where CTno='" & cuscode & "' union select Name,wcode,webhostname,Rdate,totamt,Status from webhost where Ccode='" & cuscode & "' union select code,Description,RenewalDate,Amount,Status from Renewal CCode='" & cuscode & "'", con)
Dim sqlda As New SqlDataAdapter("select T1.Projid,T1.PName,T1.Date,T1.TotalAmount,T1.Status,T2.Dcode,T2.Dname,T2.Regdate,T2.Totamt,T2.Status,T3.Name,T3.Wcode,T3.webhostname,T3.Rdate,T3.totamt,T3.Status,T4.Code,T4.Description,T4.Renewaldate,T4.Amount,T4.Status from PDetails1 T1,Domain T2,Webhost T3,Renewal T4 where T1.Ccode=T2.CTNo and T2.CTno=T3.CCode and T4.CCode=T1.Ccode and T1.CCode= '" & cuscode & "' and T2.CTno='" & cuscode & "' or T3.Ccode='" & cuscode & "' Or T4.CCode='" & cuscode & "' order by T4.CCode", con)
Dim ProDset1 As New DataSet
sqlda.Fill(ProDset1)
Dim rrview As New reportviewer
Dim RptProstmt As New cusreport
RptProstmt.SetDataSource(ProDset1.Tables(0))
Please help me
Thanks in advance