简体   繁体   English

删除水晶报表中的默认排序

[英]Remove default sorting in crystal reports

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:在按cntEcount.i排序的水晶报告中, cntEcount.i得到如下水晶报告:

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.所以我尝试将日期字段添加到记录排序专家......但仍然得到按cntEcount.排序的cntEcount.

I am working on a windows application..so where do I have to make a change to allow sorting by date?我正在开发一个 windows 应用程序那么我必须在哪里进行更改以允许按日期排序?

Image from other question:来自其他问题的图片:

my " Record Sort Expert" is like this:我的“记录排序专家”是这样的:在此处输入图片说明

As you have groups on CntEcode and Ename Crystal will always sort by these fields first, sadly there is no easy way around this.正如你对群体CntEcodeEname晶体将始终排序这些领域的第一,可悲的是这周围没有简单的方法。

If you can describe what you are using the groups for there may be a work around that doesn't use groups.如果您可以描述您使用组的目的,则可能有一种不使用组的解决方法。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM