2017-01-27 1 views
0

는 내가 Excel에서 그 해결 질문 보고서 뷰어에서 차트의 날짜를 표시하는 방법?

How to show dates in a chart in 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

확인. '분류 그룹 속성 ...'-> '정렬'섹션에서 정렬 유형을 변경하거나 (각 행에 uniqe 값이있는 경우) 삭제하십시오.

관련 문제