LINQ to xml with grouping

VS 2008 Pro.

I'm writing an html report using LINQ to XML by accesing a datatable that I 
filled with data.

the output is currently like this:

<html>
....
<table>
....
<tbody>
                                      <%= From o In dt _
                                          Select <tr>
                                                     <td><%= o.Field(Of 
String)("Description") %></td>
                                                     <td><%= o.Field(Of 
Int32)("Itemnum") %></td>
                                                     <td><%= o.Field(Of 
String)("Name") %></td>
                                                     <td style="text-align: 
right;"><%= o.Field(Of Int32)("OrderCount").ToString("N0") %></td>
                                                     <td style="text-align: 
right;"><%= o.Field(Of Int64)("PacketTotal").ToString("N0") %></td>
                                                     <td style="text-align: 
right;"><%= o.Field(Of Decimal)("TotalSold").ToString("N2") %></td>
                                                 </tr> %>
                                  </tbody>
</table>
</html>

I want to insert a new row <tr><td>... each time the field "Description" 
changes and subtotal the "OrderCount", "Packettotal" and "TotalSold" fields.

I can't seem to find anything on Google, but it's probably just because I 
don't know the proper question.

Can someone offer a sample or point me to some instructions?

Thanks,

Rick 

0
Rick2256 (24)
8/14/2008 12:30:13 PM
dotnet.xml 7266 articles. 0 followers. Follow

8 Replies
753 Views

Similar Articles

[PageSpeed] 52

Rick wrote:

> I want to insert a new row <tr><td>... each time the field "Description" 
> changes and subtotal the "OrderCount", "Packettotal" and "TotalSold" 
> fields.
> 
> I can't seem to find anything on Google, but it's probably just because 
> I don't know the proper question.

The VB.NET LINQ grouping construct is documented online here:
http://msdn.microsoft.com/en-us/library/bb531412.aspx


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/14/2008 1:24:38 PM
Rick wrote:

> Can someone offer a sample or point me to some instructions?

It is hard to guess your data structure definition from your sample 
therefore here is an example with a more simple example:

Class definition is

     Public Class Order
         Private descField As String
         Public Property Description() As String
             Get
                 Return descField
             End Get
             Set(ByVal value As String)
                 descField = value
             End Set
         End Property
         Private countField As Integer
         Public Property Count() As Integer
             Get
                 Return countField
             End Get
             Set(ByVal value As Integer)
                 countField = value
             End Set
         End Property
     End Class

Then the sample data and the query is as follows:

         Dim orders As New List(Of Order)
         orders.Add(New Order With {.Description = "Foo", .Count = 2})
         orders.Add(New Order With {.Description = "Bar", .Count = 3})
         orders.Add(New Order With {.Description = "Foo", .Count = 4})

         Dim doc As XElement = _
         <html>
             <body>
                 <table>
                     <thead>
                         <th>Description</th>
                         <th>Count</th>
                     </thead>
                     <%= From order In orders _
                         Group By order.Description _
                         Into DescGroup = Group, CountTotal = 
Sum(order.Count) _
                         Select _
                         <tbody>
                             <%= From o In DescGroup _
                                 Select _
                                 <tr>
                                     <td><%= o.Description %></td>
                                     <td><%= o.Count %></td>
                                 </tr> %>
                             <tr>
                                 <td></td>
                                 <td><%= CountTotal %></td>
                             </tr>
                         </tbody> %>
                 </table>
             </body>
         </html>
         doc.Save(Console.Out)
         Console.WriteLine()

The result of that is

<html>
   <body>
     <table>
       <thead>
         <th>Description</th>
         <th>Count</th>
       </thead>
       <tbody>
         <tr>
           <td>Foo</td>
           <td>2</td>
         </tr>
         <tr>
           <td>Foo</td>
           <td>4</td>
         </tr>
         <tr>
           <td></td>
           <td>6</td>
         </tr>
       </tbody>
       <tbody>
         <tr>
           <td>Bar</td>
           <td>3</td>
         </tr>
         <tr>
           <td></td>
           <td>3</td>
         </tr>
       </tbody>
     </table>
   </body>
</html>

so that does some grouping and some aggregration.




-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/14/2008 1:57:35 PM
Thanks a lot Martin,  the sample helps a lot!

Your output is not valid html.

the general structure should be
<table>
    <thead>...</thead>
    <tbody><tr><td>...</td></tr><tr>...</tr><tr>...</tr></tbody>
</table>

All of the <tr> tags are located inside one <tbody>.

I have tried to rearrange the <tbody> in your sample to get this output, but 
am stuck.  Can you tell me how to do this?

Also, I want a report total for order.Count - it would be another <tr></tr> 
in the <tbody> section - How?

I have ordered a LINQ book, but the syntax is so different than what I am 
accustomed to, it is slow going.

Thanks,

Rick

"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:eSVf1Wh$IHA.1224@TK2MSFTNGP02.phx.gbl...
> Rick wrote:
>
>> Can someone offer a sample or point me to some instructions?
>
> It is hard to guess your data structure definition from your sample 
> therefore here is an example with a more simple example:
>
> Class definition is
>
>     Public Class Order
>         Private descField As String
>         Public Property Description() As String
>             Get
>                 Return descField
>             End Get
>             Set(ByVal value As String)
>                 descField = value
>             End Set
>         End Property
>         Private countField As Integer
>         Public Property Count() As Integer
>             Get
>                 Return countField
>             End Get
>             Set(ByVal value As Integer)
>                 countField = value
>             End Set
>         End Property
>     End Class
>
> Then the sample data and the query is as follows:
>
>         Dim orders As New List(Of Order)
>         orders.Add(New Order With {.Description = "Foo", .Count = 2})
>         orders.Add(New Order With {.Description = "Bar", .Count = 3})
>         orders.Add(New Order With {.Description = "Foo", .Count = 4})
>
>         Dim doc As XElement = _
>         <html>
>             <body>
>                 <table>
>                     <thead>
>                         <th>Description</th>
>                         <th>Count</th>
>                     </thead>
>                     <%= From order In orders _
>                         Group By order.Description _
>                         Into DescGroup = Group, CountTotal = 
> Sum(order.Count) _
>                         Select _
>                         <tbody>
>                             <%= From o In DescGroup _
>                                 Select _
>                                 <tr>
>                                     <td><%= o.Description %></td>
>                                     <td><%= o.Count %></td>
>                                 </tr> %>
>                             <tr>
>                                 <td></td>
>                                 <td><%= CountTotal %></td>
>                             </tr>
>                         </tbody> %>
>                 </table>
>             </body>
>         </html>
>         doc.Save(Console.Out)
>         Console.WriteLine()
>
> The result of that is
>
> <html>
>   <body>
>     <table>
>       <thead>
>         <th>Description</th>
>         <th>Count</th>
>       </thead>
>       <tbody>
>         <tr>
>           <td>Foo</td>
>           <td>2</td>
>         </tr>
>         <tr>
>           <td>Foo</td>
>           <td>4</td>
>         </tr>
>         <tr>
>           <td></td>
>           <td>6</td>
>         </tr>
>       </tbody>
>       <tbody>
>         <tr>
>           <td>Bar</td>
>           <td>3</td>
>         </tr>
>         <tr>
>           <td></td>
>           <td>3</td>
>         </tr>
>       </tbody>
>     </table>
>   </body>
> </html>
>
> so that does some grouping and some aggregration.
>
>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 

0
Rick2256 (24)
8/14/2008 9:20:45 PM
Rick wrote:

> Your output is not valid html.
> 
> the general structure should be
> <table>
>    <thead>...</thead>
>    <tbody><tr><td>...</td></tr><tr>...</tr><tr>...</tr></tbody>
> </table>
> 
> All of the <tr> tags are located inside one <tbody>.

Sorry, that is not true, HTML tables allow several tbody elements, see
http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1, it says
   <!ELEMENT TABLE - -
      (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
so you can have several tbody elements.




-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/15/2008 11:08:12 AM
Thanks for pointing that out about multiple <tbody> tags inside a table.  I 
don't do many html reports, but on occasion they are quick and convenient as 
a reporting tool, especially now with LINQ.

Rick

"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:%239722cs$IHA.4684@TK2MSFTNGP06.phx.gbl...
> Rick wrote:
>
>> Your output is not valid html.
>>
>> the general structure should be
>> <table>
>>    <thead>...</thead>
>>    <tbody><tr><td>...</td></tr><tr>...</tr><tr>...</tr></tbody>
>> </table>
>>
>> All of the <tr> tags are located inside one <tbody>.
>
> Sorry, that is not true, HTML tables allow several tbody elements, see
> http://www.w3.org/TR/html4/struct/tables.html#h-11.2.1, it says
>   <!ELEMENT TABLE - -
>      (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
> so you can have several tbody elements.
>
>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 

0
Rick2256 (24)
8/15/2008 11:28:13 AM
Rick wrote:

> Also, I want a report total for order.Count - it would be another 
> <tr></tr> in the <tbody> section - How?

Here is another tbody section displaying the total of all order.Count 
values:

         Dim doc As XElement = _
         <html>
             <body>
                 <table>
                     <thead>
                         <th>Description</th>
                         <th>Count</th>
                     </thead>
                     <%= From order In orders _
                         Group By order.Description _
                         Into DescGroup = Group, CountTotal = 
Sum(order.Count) _
                         Select _
                         <tbody>
                             <%= From o In DescGroup _
                                 Select _
                                 <tr>
                                     <td><%= o.Description %></td>
                                     <td><%= o.Count %></td>
                                 </tr> %>
                             <tr>
                                 <td></td>
                                 <td><%= CountTotal %></td>
                             </tr>
                         </tbody> %>
                     <tbody>
                         <tr>
                             <th>Total</th>
                             <td><%= Aggregate order In orders Into 
Sum(order.Count) %></td>
                         </tr>
                     </tbody>
                 </table>
             </body>
         </html>


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/15/2008 11:55:20 AM
Thanks Martin, your examples are very helpful.

I could not figure out how to format the Aggregate result (ToString("N0") so 
I saved it to another variable outside the XElement and then formatted it 
inline.  Is there a way to do this directly?

I tried:

    Aggregate order In orders Into Sum(order.Count).ToString("N0")
    (Aggregate order In orders Into Sum(order.Count)).ToString("N0")

but neither would compile.

Rick

"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:OUktM3s$IHA.3756@TK2MSFTNGP03.phx.gbl...
> Rick wrote:
>
>> Also, I want a report total for order.Count - it would be another 
>> <tr></tr> in the <tbody> section - How?
>
> Here is another tbody section displaying the total of all order.Count 
> values:
>
>         Dim doc As XElement = _
>         <html>
>             <body>
>                 <table>
>                     <thead>
>                         <th>Description</th>
>                         <th>Count</th>
>                     </thead>
>                     <%= From order In orders _
>                         Group By order.Description _
>                         Into DescGroup = Group, CountTotal = 
> Sum(order.Count) _
>                         Select _
>                         <tbody>
>                             <%= From o In DescGroup _
>                                 Select _
>                                 <tr>
>                                     <td><%= o.Description %></td>
>                                     <td><%= o.Count %></td>
>                                 </tr> %>
>                             <tr>
>                                 <td></td>
>                                 <td><%= CountTotal %></td>
>                             </tr>
>                         </tbody> %>
>                     <tbody>
>                         <tr>
>                             <th>Total</th>
>                             <td><%= Aggregate order In orders Into 
> Sum(order.Count) %></td>
>                         </tr>
>                     </tbody>
>                 </table>
>             </body>
>         </html>
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 

0
Rick2256 (24)
8/15/2008 4:09:40 PM
Rick wrote:

> I could not figure out how to format the Aggregate result 
> (ToString("N0") so I saved it to another variable outside the XElement 
> and then formatted it inline.  Is there a way to do this directly?
> 
> I tried:
> 
>    Aggregate order In orders Into Sum(order.Count).ToString("N0")
>    (Aggregate order In orders Into Sum(order.Count)).ToString("N0")
> 
> but neither would compile.

I think you want
   <td><%= (Aggregate order In orders Into 
Sum(order.Count)).ToString("N0") %></td>

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
8/15/2008 4:36:53 PM
Reply:

Similar Artilces:

Working with XML Files in Dexterity
I have a lot of programming ahead of me (and behind me) working with XML, and I'm working exclusively with Dex (as I have been for 11 years). We need to do some some pretty serious and robust XML file exchanges for various types of transactions. There seems to be two ways to go about this in Dex: 1) going line-by-line looking at nodes with the "dataNode.childNodes.item..." functions, and maneuvering data types for EACH item in a table, For Example: dataNode = rootnodeDispatch.selectSingleNode("VehicleModel"); if not empty(dataNode) then NodeText = dataNode; dat...

Change the XML elements sequence
I export some database data to an XML file. How do I change the sequence of the elements (fields) appear in the XML document? For example, my XML output from TableA is: <TableA> <Field(0)> <Field(1)> <Field(2)> <Field(3)> </TableA> If I want to change the sequence of the fields to: <TableA> <Field(0)> <Field(3)> <Field(1)> <Field(2)> </TableA> Does anyone know what is the easiest way to do this without using "select" statement? (Because this example has been simplified for easier illustrat...

LINQ to XML - Performance
Hi, Can anyone tell me how the performance compares between working with xml documents in the normal way (i.e. with xpath and the System.Xml) and LINQ. Is it any quicker or slower? Are there are distinct benefits to the user (and not just advantages for the coder) to working with LINQ? The work i will be doing is creating an xml document out of segments from other xml documents, transforming the document (XSL) and then retrieving/amending/appending data to the document. Currentlly xml transformations in .net 2.0 are very slow and performance takes a real hit with complex transforms. ...

XML Inheritance
I posted this message yesterday on a different group which may have been the wrong group, so I am not cross posting on purpose. Hi, I have a question regarding how the .Net framework interprets schema definitions based on existing types. I have (for the purposes of demonstration) a very simple types schema which contains some PersonName (T_PERSONNAME) and Address (T_ADDRESS) details as below. <?xml version="1.0" encoding="utf-16" ?> - <xs:schema xmlns=http://com.test.schemas.BaseTypes xmlns:b="http://schemas.microsoft.com/BizTalk/2003" ...

distribution group #7
Do you have to establish an email address for distribution groups so they will show up in the GAL? If you do how do you keep the mailbox from filling up with emails? A DL is NOT a mailbox. Its just a group membership. "Brandon" <whocares@you.com> wrote in message news:%239vdMysPGHA.1096@TK2MSFTNGP11.phx.gbl... > Do you have to establish an email address for distribution groups so they > will show up in the GAL? If you do how do you keep the mailbox from > filling up with emails? > On Fri, 3 Mar 2006 08:10:34 -0600, "Brandon" <whocares@yo...

Generete an XML instance from its XSD
Hi Is there a way to generate in code an empty instance of an XML from it's XSD? I have a lot of schemas and I want at run time to create an empty instance for them (I then have to fill one or two fields). Shahar Shahar Ron wrote: > Is there a way to generate in code an empty instance of an XML from it's XSD? > I have a lot of schemas and I want at run time to create an empty instance > for them (I then have to fill one or two fields). Check out this article <URL:http://msdn2.microsoft.com/en-us/library/aa302296.aspx> which has code to create a sample documen...

How to MoveFirst, MoveNext, MovePrevious, MoveLast in LinQ To XMl Please Help
I have the Next XML var xml = new XElement( "clients", new XElement("client", new XAttribute("id",1), new XElement( "name", "Luis"), new XElement( "country", "Portugal") ), new XElement("client", new XAttribute("id",2), n...

Routing Group Connection
Hello all, We have a problem with a new company we purchased being on the same ip range as one of our other companies. this is causing the obvious problems so we have isolated the 2 centre and they can no longer talk to each other. The problem is they are both in the same exchange org and need to send mail between the servers. We have multiple routing and admin groups all with RG connectors to each server. I want to push mail from server 1 to server 2 via server 3 basically so the 2 servers can deliver mail for the users. Any suggestions? Thanks in advance. Add a second NIC to e...

Linq or dictionary
Hi, I am pretty new to Linq and I am not quite sure when it is best to use it and when other methods might be preferable. For example, I need to create a list of Sample objects which I then access by the SampleName property of each sample. The way I have generally done this would be with a Dictionary<string, Sample>, but instead I can use a List<Sample> and access using linq. I don't know which would be preferable. Any thoughts? I have example code below. Thanks! Ethan With Dictionary Dictionary<string, Sample> samples = new Dictionary<strin...

Display Count Range of Grouped Items
Hi Folks - I have a database that tracks criminal cases. For each case, there can be multiple charges. Also, for each case, there could be the same charge for many counts. So, the data would look something like this: Count Charge 1 Charge1 2 Charge1 3 Charge1 4 Charge2 5 Charge2 6 Charge3 7 Charge3 8 Charge4 I'd like a report to be formatted like this: Counts 1-3 - Charge1 Counts 4-5 - Charge2 Counts 6-7 - Charge3 Count 8 - Charge 4 Not sure...

Protection Group not using both tape drives
I have a protection group setup to backup directly to tape. It involves multiple servers and volumes. I have 2 LTO4 drives but only 1 is being used. The other drive is idle. Should the protection group not be utilizing both available drives? I guess the way the protection wizard works, you can only select one device for long term protection. If it happens to be an autoloader then you are ok. If it's two drives, then I reckon you can only pick one. What I would do is setup 2 groups and backup each one to an individual drive (say half the amount of servers in each group). b...

how to write some xml into huge xml file into speceific location???
Hello! Is anyone can help me to figure out how to write some xml into huge xml file into speceific location??? Say, i have a file about 139 Mb and i need to write some data (xml) into it, but in speceific location (specified by XPath for example). i have tryed used MSXML dom for it, but its eats memory like a twice bigger then my file. Is any way to do that without that hurt? thank you, Xenia. Xenia wrote: > Is anyone can help me to figure out how to write some xml into huge xml file > into speceific location??? > > Say, i have a file about 139 Mb and i need to write some d...

Cannot see Administrative Groups
Exchange 2003 SP1 environment. Delegated a group Exchange View Only Administrator permissions at the Org level. Users in the group open system manager on a win2003 DC (has Exchange 2003 SP1 applied as well) and see only the Recipients and Tools containers under the Organization. Global Settings and Administrative Groups containers are not visible. In properties of Organization object, the Display Administrative Groups box is checked. Sounds like a permissions problem, but permissions on the one administrative group we have shows that the Exchange View Only Administrator permission...

XML/DTD interpreted display...
Is there control in VB2005 (VS8.0) that can display & allow editing of mixed content XML as defined in specified DTD WYSIWYG style??? Thanks in Advance... -- Timothy Casey GPEMC! >> 11950 is the number@fieldcraft.com.au 2email Terms & conditions apply. See www.fieldcraft.biz/GPEMC Discover valid interoperable web menus, IE security, TSR Control, & the most advanced speed reading application @ www.fieldcraft.biz Number 11950 - GPEMC! Replace number with 11950 wrote: > Is there control in VB2005 (VS8.0) that can display & allow editing of mixed > cont...

Received external mail sent to a non existing group
Hi guys, I received and external mail sent to a non existing group on my domain.How is this possible.How do I prevent this sort of mail from coming in again. Thanks for your reply. Regards, -- Buchi What version of Exchange? If on 2003, you can use Recipient Filtering. (Global Settings | Message Delivery | Recipient Filtering | check "Filter recipients who are not in the Directory"; and then apply it to the appropriate SMTP Virtual Server). http://support.microsoft.com/default.aspx?scid=kb;en-us;823866 -- Bharat Suneja MCSE, MCT -------------------------------- "Buc...

Question about XML schema and blank element
Hey there, I'm running into an issue and wondered if any of you XML gurus know a solution. I'm currently using XML as a data transport mechanism between two applications and an XML schema for format validating purposes. Whenever I have an child element that is nested inside another element, the child element must not be empty or I get the following error message: "'Element' is an invalid node type." I've worked around this by adding a filler element as the first child element with junk as the inner text. The error only occurs if the FIRST child element is empt...

Linq to BindingList
Hello. How can I send the result of a LINQ query to a BindingList? I say not to do this: <Customer> List lst = (from cust in select new dataContext.Customer Customer (cust)). ToList <Customer> (); foreach (Customer c in lst) lbindingListCust.Add (c); Any ideas? ...

Need help grouping charts
I have identical charts which occur on multiple sheets. Is there any wa to group them for editing? When I group the sheets themselves, it seems to deactivate the charts I tried doing it with a macro as an alternative and then flipping th sheets one by one and keying the macro, but I get a message box with: "Run-time error 1004", "Unable to get the ChartObjects property of th worksheet class". Does anyone have any ideas -- Izz ----------------------------------------------------------------------- Izzy's Profile: http://www.excelforum.com/member.php?action=getin...

XML Custom serialization
Hi all, I want to serialize a class in a customized way. But I don't want to implement the ISerializable interafce because I don't want to take care of every new field I insert to the class. What I need is a way to customize the serialization of a specific field in my class but leave the rest to the build-in serialization. Any guidance will be appreciated. Ro'ee <sfa.roy@gmail.com> wrote in message news:7243a1eb-3fa3-43e0-8339-d90f890e6716@b1g2000hsg.googlegroups.com... > Hi all, > > I want to serialize a class in a customized way. But I don't want to >...

populate a DataSet via a LINQ query (Linq to XML)
Is there a way to populate a DataSet via a LINQ query? (Linq to XML) Instead of; DataSet ds = new DataSet(); ds.ReadXml(myfile.xml, XmlReadMode.InferTypedSchema); dataGridView1.DataSource = ds.DefaultViewManager; dataGridView1.DataMember = "myNode"; Anthony Anthony wrote: > Is there a way to populate a DataSet via a LINQ query? > > (Linq to XML) > > Instead of; > DataSet ds = new DataSet(); > ds.ReadXml(myfile.xml, XmlReadMode.InferTypedSchema); > dataGridView1.DataSource = ds.DefaultViewManage...

Creating a group in address book
Hello; How can i create a group of Email addresses and name it as MyGroup (for example),so i type MyGroup in To: box of Microsoft Outlook and the email be sent to all the reciepients of group? Thank you so much in advance. In addition to Milly's answer, note that this will not hide the contents of the group from all recipients - if you don't want everyone to see all the recipient addresses (which is good, because you should treat people's email addys as you would unlisted phone numbers) you'd put the group/list name in the BCC field, and put your own address in the To field ...

importing XML doc into SQL Server
Hello, I am trying to import an XML document into SQL Server. I have tried DTS, bulk loading into SQL server and anything else I can think of... The only thing that has worked slightly is : Dim objSQLConn As New SqlConnection(Constants.ConnectionString) Dim objAdapter As SqlDataAdapter Dim objDataRow, objDBRow As DataRow Dim objDSXML As New DataSet() Dim child As Xml.XmlNode Dim objDSDBTable As New DataSet("tblStandardstest") Dim ObjCmdBuilder As SqlCommandBuilder objDSXML.ReadXml("c:/inetpub/wwwroot/olpt7/ACH_STATE_SUBJECT_Ohio_2001_Engli sh.xml") objSQLConn.Open(...

Group Calendar software
Was wondering if anyone knows of a good/cheap 3rd party software for group calendar... Having issues with Exchange 2003 calendars after the DST patch application. Thanks !!! -- On Tue, 10 Apr 2007 07:20:58 -0400, "Thinkpad21" <thinkpad21@yahoo.com> wrote: >Was wondering if anyone knows of a good/cheap 3rd party software for group >calendar... > >Having issues with Exchange 2003 calendars after the DST patch application. > >Thanks !!! Not sure I understand. Are you getting rid of Exchange or do you want something to put on top of Exchange to help wit...

Need Linq Help
I need linq help. I have a dictionary where the keys are strings and I need to select from that dictionary into another dictionary where the first two characters of the key match a parameter. For exmaple here is the code: Dictionary<string, string> origDict =3D new Dictionary<string, string>(); origDict.Add(""BSOne", "1") origDict.Add(""BSTwo", "2") origDict.Add(""PLOne", "11") origDict.Add(""PLTwo", "22") I need to select into a new dictionary only where the keys star...

THANKS A LOT FOR THIS GROUP
I am just making the final touches in my POS before I go live next Monday. I just want to say THANKS A LOT to all of you for taking the time to answer the questions posted because I do not know what I could have done without this group. I have to say it out loud Microsoft Dynamics User's Guide is not very good at giving details and after expending $20K, I do not think that I should pay $500/3hr to get a basic question answered. Thanks a lot Gina Gina, I agree - without this group and the kind assistance from the many that frequent it - we all would have given up a long time ago. ...