c# - SelectGroupByInto is not grouping! -


I am trying to use a column to group a dataset.

What I am doing:

  Dataset ds_tmp = new dataset (); Datatelle dt_tmp; Ds_tmp.Tables.Add (data_table_UserTime); DsHelper = New Dataset Helper (Ref DSI_TTP); Dt_tmp = dsHelper.SelectGroupByInto ("UniqueUsers", ds_tmp Tables [0], "Users, zodiac (time) total time", "time"; "0", "user");  

data_table_UserTime is something like this:

Users ------ Time

John ------ 0.6

Mark ------ 1.2

Paul ------ 7.1

John ------ 52.6

John - <0.8

Paul ------ 50.3

< / Blockquote>

Finally, should be dt_tmp :

User ------ Time

John ------ 54.0

Mark ------ 1.2

Paul ------ 57.4

But what do I get:

Users ------ Time

John ------ 0.6

John ------ 52.6

Jaw ------ 0.8

Mark ------ 1.2

Paul ------ 7.1

Paul ----- - 50.3

It seems that this amount is not (time).

What's going on?

Thanks in advance. Wow, I never imagined that this dataset would be a bug in the Halper class.

It seems that there are some problems with numerical values.

The function column aquell should be changed to:

  Personal Bull Column AQUALLE (Object A, Object B) {/ * * Compares two values ​​to see that Are they equal? Also compare DBNULLkValue * * Note: If there are object fields in your Detatale, you must expand * function to them allows * meaningful way if you intend to group them. * / If ((is a debuble) & returns (b is debut)); // Both are zero if ((is a debubulle) || (BDbibul)) wrong return; // Only have an empty refund (a.ToString () == B. ToString ()); // value type standard comparison}  

difference. The ToString () == b.ToString (), which is basically a == b.

Anyway Thanks!


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -