2017-01-27 11 views
0

は、私が質問レポートビューアでグラフの日付を表示する方法は?

How to show dates in a chart in Excel?

を尋ねた私は、Excelでこれを解決し、しかし、私はレポートビューアで同じ問題を抱えています。データを(前年に関連して)チャートの右側にシフトします。 私の日付データは文字列形式です。

List<Report> tempList = new List<Report>(); 

foreach (DataRow row in DT.Rows) 
{ 
    Report temp = new Report();//class 
    temp.Row = Convert.ToInt16(row["Row"].ToString()); 
    temp.Date = row["Date"].ToString(); 
    temp.Value= Convert.ToDouble(row["Value"].ToString()); 
    tempList.Add(temp); 
} 

Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new   Microsoft.Reporting.WinForms.ReportDataSource(); 
string reportEmbeddedResource = "ETc.Report1.rdlc"; 

reportDataSource1.Name = "DataSet1"; 
reportDataSource1.Value = this.ReportBindingSource; 
this.reportViewer.LocalReport.DataSources.Add(reportDataSource1); 
this.reportViewer.LocalReport.ReportEmbeddedResource = reportEmbeddedResource; 

this.ReportBindingSource.DataSource = tempList; 

this.reportViewer.RefreshReport(); 

答えて

0

OK。 '分類グループプロパティ...' - > '並べ替え'セクションで、並べ替えタイプを変更するか(各行にuniqe値がある場合)、または削除します。

関連する問題