Ok: Here is the background information:
I am running a
VB.NET Windows application that buuilds a query based upon selections made from a form, and queries an ORACLE database via a somewhat complicated PIVOT query. The resulting dataset is filled, and then I bind it to a dataset, and everything works great.
The data resembles the following:
District Category COMPLETE INCOMPLETE SKIPPED
Cheshire A 1250 101 595
Cheshire B 751 37 122
Cheshire C 409 12 206
Hartford A 2842 175 822
Hartford B 1102 75 270
Hartford C 889 111 102
.... and so on.
What I would like to do is :
Add a row between each District and the next that gives the total for each of the three rows for each numeric column
The resulting datatable would look like this:
District Category COMPLETE INCOMPLETE SKIPPED
Cheshire A 1250 101 595
Cheshire B 751 37 122
Cheshire C 409 12 206
Total Cheshire 2410 150 923
Hartford A 2842 175 822
Hartford B 1102 75 270
Hartford C 889 111 102
and so on....
In thinking about this, I figured I could parse through the rows one by and calculate the running sums, but eventually getting the new rows into the datatable in the proper location might be problematic. As I unerstand it, the Newrow method for a datatable won't re-arrange them, just add them to the end of the table.
Any advice on how I should proceed to build these additional rows?