15,907,687 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 14076249 (Top 24 by date)
Member 14076249
10-Jan-19 4:16am
View
What i want is to subtract the previous balance to the current row principal only and display the sum in the balance of the current row. Please see the datagridview example. thank you!
Member 14076249
10-Jan-19 4:00am
View
the solution that you suggest for my code will subtract all of the principal and balance i think, i want to subtract the previous row balance and current row principal in datagridview.
Member 14076249
10-Jan-19 3:54am
View
Neophyte i didn't use query to subtract value from datagridview.
Member 14076249
10-Jan-19 3:44am
View
i don't want to add another column in my datagridview because i already have the column for the balance what i want is to subtract the current row principal to the previous row balance so i can get the result and display it on the current row balance.
Member 14076249
10-Jan-19 3:39am
View
The answer should be put in the current row in the balance.
Member 14076249
29-Dec-18 0:19am
View
ahhh sorry i just copied it, but i already tried to changed them to decimal and i still get the same result it keeps adding and subtracting the decimal.
Member 14076249
28-Dec-18 22:57pm
View
[ System Result ]
Principal: 765517.81 Interest: 128000.00 Balance: 24834482.19
Principal: 769345.40 Interest: 124172.41 Balance: 24065136.79
Principal: 773192.13 +1 Interest: 120325.68 Balance: 23291944.66 -1
Principal: 777058.09 Interest: 116459.72 Balance: 22514886.57 -1
Principal: 780943.38 Interest: 112574.43 Balance: 21733943.19 -2
Principal: 784848.09 Interest: 108669.72 Balance: 20949095.11 -1
Member 14076249
28-Dec-18 22:39pm
View
i tried using Decimal.Round(value,2) yes it resolve the 2nd entry from rounding off but the next problem comes in the 3rd entry
[ Principal: 773192.13 ] and the value that i need to show is
[ 773192.12 ] because that's the result in excel and because it round up for the principal the result in the balance go up
this is the result in excel, you will notice that i put some +1 or -1 -2 that's the result in my system it keeps subtracting or adding i have -0.05 in my balance as the final result
Principal: 765517.81 Interest: 128000.00 Balance: 24834482.19
Principal: 769345.40 Interest: 124172.41 Balance: 24065136.79
Principal: 773192.12+1 Interest: 120325.68 Balance: 23291944.67 -1
Principal: 777058.09 Interest: 116459.72 Balance: 22514886.58 -1
Principal: 780943.38 Interest: 112574.43 Balance: 21733943.21 -2
Member 14076249
28-Dec-18 21:55pm
View
Deleted
Decimal.Round(balance * (interestrate / 12), 2) i get an error here..
[error]
Overload resolution failed because no accessible 'Round' can be called without a narrowing conversion
Member 14076249
28-Dec-18 21:53pm
View
but where do i put that Decimal.Round(value,2) ?, exatly that's the result that i want but some of the decimal is not the same with the excel, the 3rd entry in the principal should be .12 like in the excel and for the balance 3rd .66 should be .67 like in the excel same goes with fifth entry .20 = .21
Member 14076249
28-Dec-18 5:48am
View
but how do i display it what i exactly i want like 769,345.40 not .39
Member 14076249
28-Dec-18 5:48am
View
MsgBox i use this for just a sample. hehe
Member 14076249
28-Dec-18 5:38am
View
i think i have another problem instead of
773192.12 for the interest i get 773192.13
and for the principal or balance
23291944.66 instead of 23291944.67
Member 14076249
28-Dec-18 5:22am
View
sorry i'm using MessageBox class too, but thanks!
Member 14076249
28-Dec-18 5:13am
View
yes! i get 769,345.39 instead of 769,345.40 ,the system value is 769,345.39905
Member 14076249
28-Dec-18 5:01am
View
i already tried using decimal but i keep getting the same error with the decimal
Member 14076249
28-Dec-18 4:52am
View
can you tell me in a simple way how to use Round half up i'm a little bit confused or how do i put it in my program without major changing?
Member 14076249
28-Dec-18 4:32am
View
yes i tried using the add watch and for the actual value is 769,345.39905 in my system, by the way this is in for loop so i need to subtract this 31 times or it depends on what i enter. i get the exact result but not for the decimal.
Member 14076249
28-Dec-18 4:10am
View
for the result in excel
765,517.81
769,345.40
Result in my system
765,517.81
769,345.39
Member 14076249
28-Dec-18 4:02am
View
i have the same computation in excel but my problem is why i don't get the exact value for the decimal.
Member 14076249
14-Dec-18 0:46am
View
it don't accept multiple entries or same empid but i want to display it as a message in my program
Member 14076249
14-Dec-18 0:02am
View
Bryian, yes empid is primary
Member 14076249
13-Dec-18 23:59pm
View
what i want is to set a query that checks or display if the data that you have entered is already in the database
Member 14076249
13-Dec-18 23:58pm
View
Deleted
what i want is to set a query that checks or display if the data that you have entered is already in the database
Show More