B
Brett Romero
I have a winform with a reportviewer object on it. I'm trying to get
data from a datatable to display on the report. myDatatTable is
created and filled at runtime. I don't get any errors but only the
literal below displays in the report.
Microsoft.Reporting.WinForms.ReportDataSource rds = new
Microsoft.Reporting.WinForms.ReportDataSource();
rds.Name = myDataTable.TableName;
rds.Value = myDataTable;
reportViewer1.LocalReport.ReportPath = "Report1.rdlc";
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(rds);
reportViewer1.RefreshReport();
In the report designer, I have a textbox with this in it
Fields!PersonCode.Value
I've also tried
=First(Fields!PersonCode.Value)
Any suggestions on what I'm doing wrong?
Thanks,
Brett
data from a datatable to display on the report. myDatatTable is
created and filled at runtime. I don't get any errors but only the
literal below displays in the report.
Microsoft.Reporting.WinForms.ReportDataSource rds = new
Microsoft.Reporting.WinForms.ReportDataSource();
rds.Name = myDataTable.TableName;
rds.Value = myDataTable;
reportViewer1.LocalReport.ReportPath = "Report1.rdlc";
reportViewer1.LocalReport.DataSources.Clear();
reportViewer1.LocalReport.DataSources.Add(rds);
reportViewer1.RefreshReport();
In the report designer, I have a textbox with this in it
Fields!PersonCode.Value
I've also tried
=First(Fields!PersonCode.Value)
Any suggestions on what I'm doing wrong?
Thanks,
Brett