I'm new to VB so please don't laugh too loudly at my coding skills :)
I have created a dataset (Dataset1) that pulls from 2 tables. The SQL on the table adapter joins the 2 tables. The table adapters all return data correctly. The data sources on the report viewer are:
DataSet1_uaPowderCoat
DataSet1_uaPowderCoatType
and they are both instantiated to their binding sources. There is a report parameter (Lot Num) that needs to filter the info in the report to data from one row.
Code in the form load event:
Me.ReportViewer1.LocalReport.DataSources.Clear()
Me.ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("DataSet1_uaPowderCoat", uaPowderCoatTableAdapter.GetData()))
Me.ReportViewer1.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("DataSet1_uaPowderCoatType", UaPowderCoatTypeTableAdapter.GetData()))
Me.ReportViewer1.RefreshReport()
And in the report event:
Dim params(0) As Microsoft.Reporting.WinForms.ReportParameter
params(0) = New Microsoft.Reporting.WinForms.ReportParameter("Report_Parameter_0", Me.txtLotNumber.Text)
ReportViewer1.LocalReport.SetParameters(params)
Me.uaPowderCoatTableAdapter.FillByPCLotNbr(DataSet1.uaPowderCoat, me.txtLotNumber.Text)
Me.ReportViewer1.RefreshReport()
Report Fields are: =Parameters!Report_Parameter_0.Value
=(Fields!PCStrength.Value)
The Parameter field works fine, but I can't get the rest of the fields to populate (just #error). I have researched and tried a ton of different things and if I get one thing fixed something else goes wrong. Can anyone help?
Thanks!!!