Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to display records from multiple table adapter in a single crystal report. I add two table adapter in my dataset and add this adapters to my crystal report with database expert. There are two tabs named Data and Link in database expert. In Data ,I choosed my tableadapters and In link ,I determine relation of tableadapters .after that in link tab there are three button (ok,cancel,help) that i click ok and set my fields in columns of report.by doing these steps when i ran my program i had this error: logon database failed
Posted
Updated 30-Sep-14 22:46pm
v3
Comments
Samatha Reddy G 30-Sep-14 8:32am    
Next button is enabled ofter selection of the fields in a table. you have these symbols (> >> < <<) using these symbols you need to select fields to display in report. after that next button will be enabled then you click on next button to complete the process. try like this then also if get same problem i will explain in detail
Member 10808329 1-Oct-14 4:47am    
I had a mistake this link was about tables but i want to work with table adapters

1 solution

i think the problem is with the OLEDB Connection.Check this thread.It suggest to "Change the Crystal report to use an OLE DB datasource rather than the SAP Business One data source."

and for the second question you are facing just click on ok button after finishing the datatable linking part.Then drag and drop only neccesary field to the report you want to display.The tutorial you have gone through is an old version of CR.

This is a good article you to follow
 
Share this answer
 
Comments
Member 10808329 1-Oct-14 6:40am    
in second question ,I click ok and drag and drop my neccesary fields to the report.
my dataset has two adapter(CustomerBill,Transactions).but i have a error database logon failed.i think there is a poblem with my code behind:
Dim dt As New DataSet("DS_CustomerTransaction")
dt = cls.Search_Cust_Bill_RPT(ArrStr(0))
dt.Tables(0).TableName = "CustomerBill"
Dim oRpt As New Crp_Cust_suratHesab()
oRpt.SetDataSource(dt)
CrystalReportViewer1.ReportSource = oRpt
CrystalReportViewer1.DataBind()
Dilan Shaminda 1-Oct-14 7:31am    
Just comment your crystal report code and check whether how many rows you are getting to your dt object :-)
Member 10808329 1-Oct-14 7:48am    
yes,in above code dt was filled and have all the row that i want but there is database logon error .also i changed my code to below and there is no error but report is empty but dt is filled.
Dim cls As New Cls_Cust_Bill
Dim dt As New DataSet("DS_CustomerTransaction")
dt = cls.Search_Cust_Bill_RPT(ArrStr(0))
dt.Tables.Add("CustomerBill")
dt.Tables.Add("Transactions")
Dim oRpt As New Crp_Cust_suratHesab()
oRpt.SetDataSource(dt)
oRpt.SetParameterValue("filter", ArrStr(1))
CrystalReportViewer1.ReportSource = oRpt
CrystalReportViewer1.DataBind()
Dilan Shaminda 1-Oct-14 8:08am    
are you using OLEDB Connection?
Member 10808329 1-Oct-14 8:14am    
no,i am not

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900