I have a dataset I have created and sorted, I then bind it to a Crystal Report:
Dim cmd As New SqlCommand("Driverperformance", con.connect)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@Ecode", SqlDbType.NVarChar, 50, ParameterDirection.Input).Value = Ecode
cmd.Parameters.Add("@startdate", SqlDbType.DateTime, 50, ParameterDirection.Input).Value= fromd
cmd.Parameters.Add("@enddate", SqlDbType.DateTime, 50, ParameterDirection.Input).Value= endd
da.SelectCommand = cmd
da.Fill(ds)
Dim rpt As New Driverperformanc
rpt.SetDataSource(ds.Tables(0))
crptdriverprfrmnc.ReportSource = rpt
While executing this store procedure am getting out put sorted by date..i mean like this:
Ecode Date cntEcount cntDelcod
E003 2013-05-05 4 3
E003 2013-05-27 0 4
E003 2013-06-01 1 2
but the crystal reports losing my sorting. In crystal report sorting by cntEcount.i
getting crystal report like this:
Ecode Date cntEcount cntDelcod
E003 2013-05-27 0 4
E003 2013-06-01 1 2
E003 2013-05-05 4 3
So I try to add date field to Record Sort Expert..but still am getting report sorted by cntEcount.
I am working on a vb.net windows application..so where do I have to make a change to allow sorting by date?
Image from other question:
my " Record Sort Expert" is like this: