Click here to Skip to main content
15,890,399 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: asking for source code of visual basic 6.0 Pin
Otekpo Emmanuel28-Sep-15 17:36
Otekpo Emmanuel28-Sep-15 17:36 
Questionhow to receive SMS via USB Modem with SIM Card ? Pin
saedawke9-Sep-15 3:08
saedawke9-Sep-15 3:08 
AnswerRe: how to receive SMS via USB Modem with SIM Card ? Pin
Eddy Vluggen9-Sep-15 3:39
professionalEddy Vluggen9-Sep-15 3:39 
QuestionVB Code to perform an action, when user selects a particular cell in MS Excel Pin
Razanust8-Sep-15 18:00
Razanust8-Sep-15 18:00 
SuggestionRe: VB Code to perform an action, when user selects a particular cell in MS Excel Pin
Richard MacCutchan8-Sep-15 21:45
mveRichard MacCutchan8-Sep-15 21:45 
GeneralRe: VB Code to perform an action, when user selects a particular cell in MS Excel Pin
Razanust8-Sep-15 22:03
Razanust8-Sep-15 22:03 
SuggestionRe: VB Code to perform an action, when user selects a particular cell in MS Excel Pin
Richard MacCutchan8-Sep-15 22:22
mveRichard MacCutchan8-Sep-15 22:22 
QuestionSQL Linq, Group and Sum Pin
jkirkerx8-Sep-15 7:20
professionaljkirkerx8-Sep-15 7:20 
I wrote this a month and it seemed to work fine. Perhaps I didn't have enough data to test it against at the time.

So I finally finished my program conversion to SQL Linq and Entity Framework 6
But Now I have a few statements that are failing.

This one is suppose to sum all the invoices on a single day into 5 columns for a report and bring back 1 row of data, but I get a row for each invoice. I thought I had the groups right for the sum, but it doesn't sum the columns. So It gets the count of invoices, and then the totals.
I've been messing with it for over 2 hours now and I can't figure out how to write it correctly.
Dim m_startDate As DateTime = New DateTime(2015, 9, 1, 0, 0, 0)
Dim m_stopDate As DateTime = New DateTime(2015, 9, 1, 23, 59, 59, 999)

Dim context As New hx5Context()
Dim pResult = _
(
    From oh In context.Order_History
    Where oh.OrderDate >= m_startDate _
    And oh.OrderDate <= m_stopDate _
    And oh.OrderStatus = "COMPLETED"
    Group By oh = New With
    {
        oh.SubTotal,
        oh.Shipping,
        oh.SalesTax,
        oh.GrandTotal
    } Into Group
    Select 
    {
        Group.Count(),
        Group.Sum(Function(m) m.SubTotal),
        Group.Sum(Function(m) m.Shipping),
        Group.Sum(Function(m) m.SalesTax),
        Group.Sum(Function(m) m.GrandTotal)
    }.FirstOrDefault()
)

pResult.Dump()

AnswerRe: SQL Linq, Group and Sum Pin
Richard Deeming14-Sep-15 3:13
mveRichard Deeming14-Sep-15 3:13 
GeneralRe: SQL Linq, Group and Sum Pin
jkirkerx14-Sep-15 6:33
professionaljkirkerx14-Sep-15 6:33 
QuestionCodings in visual c++ Pin
Member 119432107-Sep-15 4:56
Member 119432107-Sep-15 4:56 
AnswerRe: Codings in visual c++ Pin
Eddy Vluggen7-Sep-15 5:10
professionalEddy Vluggen7-Sep-15 5:10 
AnswerRe: Codings in visual c++ Pin
Paul Conrad7-Sep-15 7:22
professionalPaul Conrad7-Sep-15 7:22 
AnswerRe: Codings in visual c++ PinPopular
Chris Quinn7-Sep-15 21:45
Chris Quinn7-Sep-15 21:45 
Questioncoding for the following Pin
Member 119649636-Sep-15 23:43
Member 119649636-Sep-15 23:43 
AnswerRe: coding for the following Pin
Richard MacCutchan7-Sep-15 0:01
mveRichard MacCutchan7-Sep-15 0:01 
QuestionHow to Edit Return Masked number in Datagridveiw Pin
Mohamed Hamdy4-Sep-15 6:22
Mohamed Hamdy4-Sep-15 6:22 
SuggestionRe: How to Edit Return Masked number in Datagridveiw Pin
Richard MacCutchan4-Sep-15 6:51
mveRichard MacCutchan4-Sep-15 6:51 
AnswerRe: How to Edit Return Masked number in Datagridveiw Pin
Eddy Vluggen4-Sep-15 6:56
professionalEddy Vluggen4-Sep-15 6:56 
Questionhow do i hide the values in datagridview Pin
JackieRathinam3-Sep-15 19:49
JackieRathinam3-Sep-15 19:49 
AnswerRe: how do i hide the values in datagridview Pin
Eddy Vluggen4-Sep-15 5:17
professionalEddy Vluggen4-Sep-15 5:17 
QuestionMerging 3 identical datatables and summing a column in vb.net Pin
Vijay Kumar3-Sep-15 1:25
Vijay Kumar3-Sep-15 1:25 
QuestionCompare two table Pin
dha NAA3-Sep-15 0:46
dha NAA3-Sep-15 0:46 
AnswerRe: Compare two table Pin
Ralf Meier3-Sep-15 1:51
mveRalf Meier3-Sep-15 1:51 
GeneralRe: Compare two table Pin
dha NAA3-Sep-15 3:24
dha NAA3-Sep-15 3:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.