Click here to Skip to main content
15,889,281 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: sql server 2008 how to pivot Login and logOut Pin
Member 118832203-Aug-15 15:05
Member 118832203-Aug-15 15:05 
GeneralRe: sql server 2008 how to pivot Login and logOut Pin
Richard MacCutchan3-Aug-15 21:08
mveRichard MacCutchan3-Aug-15 21:08 
QuestionRe: sql server 2008 how to pivot Login and logOut Pin
Eddy Vluggen3-Aug-15 21:29
professionalEddy Vluggen3-Aug-15 21:29 
QuestionSQL Linq, Bulk Transfer substitute Pin
jkirkerx3-Aug-15 8:02
professionaljkirkerx3-Aug-15 8:02 
Answer[solved] Pin
jkirkerx3-Aug-15 9:02
professionaljkirkerx3-Aug-15 9:02 
Questionsyntax insert in to Pin
Member 1060310631-Jul-15 22:54
Member 1060310631-Jul-15 22:54 
AnswerRe: syntax insert in to: Repost Pin
Richard MacCutchan31-Jul-15 23:07
mveRichard MacCutchan31-Jul-15 23:07 
QuestionBasic math, adding numbers, 2 methods produce different results Pin
jkirkerx30-Jul-15 11:15
professionaljkirkerx30-Jul-15 11:15 
So I'm working on a report using RDLC for a Windows App.
In the report, there are product items, basically a margin report.
So the customer told me that the final totals of cost, price and margin are off, but the line items are correct. OK.

the method loops a list(of invoiceProfit) from a database function
And there are positive, negative and 0 values in the List(of invoiceProfit)
I never manually added numbers in VB before, and have always used SQL Server to do this.
On a small report with a couple of items, its correct, but on a large report with 1000 items, it's off.

Question:
I'm missing something here on this, and I'm not sure what to think.
I think the += just adds numbers, even if the value is negative.

FYI:
I need to get back to the progress bar issue later today, perhaps now. I'll get back to that post later today or tomorrow.
//Add up the total cost value = $163,315.23
m_totalCost += i.ExtCost

//Add up the total price value = $433,211.49
m_totalPrice += i.ExtPrice

//Add up the total margin value = $270,496.00
m_totalMargin += m_margin

This method produces these values
//Add up the total cost value = $164.575.65
If (i.ExtCost > 0) Then
  m_totalCost = m_totalCost + i.ExtCost
ElseIf (i.ExtCost < 0) Then
  m_totalCost = m_totalCost - i.ExtCost
End If

//Add up the total price value = $437,101.63
If (i.ExtPrice > 0) Then
  m_totalPrice = m_totalPrice + i.ExtPrice
ElseIf (i.ExtPrice < 0) Then
  m_totalPrice = m_totalPrice - i.ExtPrice
End If

AnswerRe: Basic math, adding numbers, 2 methods produce different results Pin
PIEBALDconsult30-Jul-15 11:24
mvePIEBALDconsult30-Jul-15 11:24 
AnswerRe: Basic math, adding numbers, 2 methods produce different results Pin
jkirkerx30-Jul-15 12:22
professionaljkirkerx30-Jul-15 12:22 
AnswerRe: Basic math, adding numbers, 2 methods produce different results Pin
Richard Deeming31-Jul-15 0:36
mveRichard Deeming31-Jul-15 0:36 
GeneralRe: Basic math, adding numbers, 2 methods produce different results Pin
jkirkerx31-Jul-15 11:36
professionaljkirkerx31-Jul-15 11:36 
QuestionVB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
QuickBooksDev30-Jul-15 8:12
QuickBooksDev30-Jul-15 8:12 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
PIEBALDconsult30-Jul-15 8:43
mvePIEBALDconsult30-Jul-15 8:43 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
QuickBooksDev30-Jul-15 9:59
QuickBooksDev30-Jul-15 9:59 
AnswerRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
Wendelius30-Jul-15 8:44
mentorWendelius30-Jul-15 8:44 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
QuickBooksDev30-Jul-15 9:58
QuickBooksDev30-Jul-15 9:58 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
Wendelius30-Jul-15 10:01
mentorWendelius30-Jul-15 10:01 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
QuickBooksDev30-Jul-15 10:03
QuickBooksDev30-Jul-15 10:03 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
PIEBALDconsult30-Jul-15 10:01
mvePIEBALDconsult30-Jul-15 10:01 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
QuickBooksDev30-Jul-15 10:05
QuickBooksDev30-Jul-15 10:05 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
PIEBALDconsult30-Jul-15 10:08
mvePIEBALDconsult30-Jul-15 10:08 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
QuickBooksDev30-Jul-15 10:10
QuickBooksDev30-Jul-15 10:10 
GeneralRe: VB.net 2010,Windows Desktop Excel ADODB Provider cannot be found Pin
Richard Deeming30-Jul-15 10:31
mveRichard Deeming30-Jul-15 10:31 
QuestionPrevious and Next button Problem Pin
Member 1178652230-Jul-15 3:23
Member 1178652230-Jul-15 3:23 

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.