0

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 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:enter image description here

4

2 回答 2

1

• 右键单击​​组并转到“组专家”→ • 在“分组依据”下找到“选项”按钮→ • 在“常用”选项卡中,更改为“按原始顺序”。

于 2021-07-17T11:29:28.983 回答
0

由于您有组CntEcodeEnameCrystal 总是首先按这些字段排序,遗憾的是没有简单的方法解决这个问题。

如果您可以描述您使用组的用途,则可能有一种不使用组的解决方法。

于 2013-09-12T09:37:57.860 回答