Solved

For keijerjh - Hidden property issue

Posted on 2004-09-08
3
137 Views
Last Modified: 2010-04-23
My question was how do I get to the compute in the datagrid to do a sum of a table.  
0
Comment
Question by:oshe127
3 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 12010261
0
 
LVL 1

Accepted Solution

by:
keijerjh earned 250 total points
ID: 12013722
Hi,

Nice to hear that this was the solution.



Strange I see the problem. But it seems to be an hidden property when you access the table using the dataset.


The following code works.
------------------------------------------------------------------------
        Dim oDataSet As Data.DataSet
        Dim oDataTable As Data.DataTable
        Dim oDataRow As Data.DataRow

        oDataTable = New Data.DataTable
        With oDataTable
            .TableName = "ORDER_LINE"
            .Columns.Add("CUSTOMER_ID")
            .Columns.Add("ORDERED_QTY", GetType(Integer))
        End With
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "El Cheapo"
        oDataRow("ORDERED_QTY") = 14
        oDataTable.Rows.Add(oDataRow)
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "El Cheapo"
        oDataRow("ORDERED_QTY") = 20
        oDataTable.Rows.Add(oDataRow)
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "Wallmart"
        oDataRow("ORDERED_QTY") = 8
        oDataTable.Rows.Add(oDataRow)
        oDataRow = oDataTable.NewRow
        oDataRow("CUSTOMER_ID") = "Wallmart"
        oDataRow("ORDERED_QTY") = 9
        oDataTable.Rows.Add(oDataRow)

        oDataSet = New Data.DataSet
        oDataSet.Tables.Add(oDataTable)
        MsgBox(oDataSet.Tables("ORDER_LINE").Compute("SUM(ORDERED_QTY)", "CUSTOMER_ID='Wallmart'"))
 
 
0
 

Author Comment

by:oshe127
ID: 12015809
Thanks!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now