C# C中带有SSR的数据表问题#

C# C中带有SSR的数据表问题#,c#,reporting-services,C#,Reporting Services,我有一个已填充的数据表,我想将其传递给c#格式的报表。 在执行此操作之前,我在DataGridView中测试DataTable,以确保数据在我得到的结果中是准确的:(链接到图像) 因此,在确保DataTable中的数据正确后,我运行以下代码: this.reportViewer1.LocalReport.DataSources.Clear(); this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsRepo

我有一个已填充的数据表,我想将其传递给c#格式的报表。 在执行此操作之前,我在DataGridView中测试DataTable,以确保数据在我得到的结果中是准确的:(链接到图像)

因此,在确保DataTable中的数据正确后,我运行以下代码:

this.reportViewer1.LocalReport.DataSources.Clear();
this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsReports", dt));
this.reportViewer1.RefreshReport();
我在报告中得到的结果是:

以下是我的问题:

  • 为什么没有通道ID
  • 为什么通话日期是长日期格式
  • 完整的源代码以及数据库脚本可从以下链接获得,您可以下载它:

  • 看看您的rdl xml。该列将仅在您有该列的情况下显示
  • 日期格式-您可以在rdl xml文件中指定

  • 通话日期是固定的。我在rdlc中将文本框格式更改为“d”。
    数据集中datatable字段的名称是错误的,我也将其更改为查询中的确切名称,它成功了。

    这个rdl.xml文件在哪里?我只有1个rdlc文件。我的rdlc中存在ChannelID