Search code examples
rdlclocalreport

Some dataset fields don't appear on RDLC report


I created dataset that contains Table View from SqlServer 2008 database. Then I created a report (rdlc) and added the previous dataset as a source for this report. In the code, I called a function that returns a list from My Table View type and assign this list to the created report as following:

ReportDataSource reportSource = new ReportDataSource();
reportSource.Name = "DataSet1";
reportSource.Value = GetData(); // returns List<MyTableViewType>
localReport.DataSources.Clear();
localReport.DataSources.Add(reportSource);
localReport.Refresh();

The problem is that I have three fields in the dataset don’t appear in the report although I am sure (By Debugging) that they got filled before rendering the report.

Any help will be appreciated ... Thanks


Solution

  • You have to make sure that the dataFields name from your database is the same as declared in your report dataSource. Probably in the returned list the fields have different names.