The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Implementing Group By in a DataSet in VB.NET
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

Thomas ErbachereditedPosted Nov 18, 2012, 3:43 PMEdited Nov 18, 2012, 3:47 PM
Insert this for avg Case "avg"DestRow(Field.FieldAlias) = Avg(DestRow(Field.FieldAlias), SourceRow(Field.FieldName)) and: Public Function Avg(ByVal a As Object, ByVal b As Object) As Object'Averages two values - if one is DBNull, then returns the other'' if (a is DBNull)' return b;' if (b is DBNull)' return a;' Dim dblA As Double = 0.0Dim dblB As Double = 0.0Double.TryParse(a.ToString(), dblA)Double.TryParse(b.ToString(), dblB)Return ((Convert.ToDouble(dblA) + Convert.ToDouble(dblB)) / 2)End Function
ONPRPosted Jun 8, 2010, 5:36 AM
Thank you for great class! But why average (avg) operator is missed?
tArun cHatterjeePosted Apr 29, 2010, 8:37 AM
many thanks
kumar rajaPosted Aug 29, 2009, 6:44 AM
Hi, I am developing one windows application in vb.net which creates digitally signed pdf. I am getting one exception (System.OutOfMemoryexception) after generating some (1200) pdf. I've properly closed all objects and flushed the file stream which i've used in the application. But still i am getting the error. Any Idea?
kumar rajaPosted Aug 29, 2009, 3:05 AM
Hi Mahesh, I got it from InsertGroupByInto. Its working fine. Thank you.
kumar rajaPosted Aug 29, 2009, 2:54 AM
Dear Mahesh, I'd tried to use your DatasetHelper. Called CreateGroupByTable by passing table name, Datatable and field which datatable to be group by but it returns me only datatable with column name which i'd passed for groupby and without data. Please clarify ... Thank you for providing such usefull article.
mhaey gulanesPosted Mar 13, 2009, 1:54 AM
any other?