con.Open() '******************************************************************** Dim startDate As DateTime = DirectCast(dtpStart.Value, DateTime) Dim endDate As DateTime = DirectCast(dtpEnd.Value, DateTime) Dim ts As TimeSpan = endDate.Subtract(startDate) Dim days As Integer = ts.Days Try Dim str As String = "select distinct empfullname from employee where department='Transcription' and designation='" + cmbDesig.Text + "' order by designation, empfullname " Dim ds As DataSet ds = cnn.ExecuteDataset(str) Dim ds2 As New DataSet For i As Integer = 0 To ds.Tables(0).Rows.Count - 1 Dim cn As Integer = 0 cmd.CommandText = "select sum(actuallinecount), designation from linecountdetails where (dateoflinecount between '" + Format(Convert.ToDateTime(dtpStart.Value), "yyyy-MM-dd") + "' and '" + Format(Convert.ToDateTime(dtpEnd.Value), "yyyy-MM-dd") + "') and empfullname='" + ds.Tables(0).Rows(i).ItemArray(0).ToString() + "' " cmd.Connection = con dr = cmd.ExecuteReader() While dr.Read() If dr(0) Is DBNull.Value Then cn = 0 Else cn = dr(0) End If End While dr.Close() Dim lc As Double = cn Chart1.Series("Series1").Points.Add(lc).AxisLabel = ds.Tables(0).Rows(i).ItemArray(0).ToString() Chart1.ChartAreas("ChartArea1").AxisY.Title = "Line Count" Chart1.ChartAreas("ChartArea1").AxisX.Title = "Employee" Chart1.ChartAreas("ChartArea1").AxisX.Interval = 1 Chart1.ChartAreas("ChartArea1").AxisX.IntervalOffset = 1 Chart1.Series("Series1").Points(i).ToolTip() = lc Next 'End If Chart1.DataSource = ds.Tables("linecountdetails") Chart1.DataBind() con.Close() Catch ex As Exception End Try
chart.Series["Series1"].Points.Clear();
chart.Series[0].Points.Clear();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)