Question

My MS Access Database table consist of some data's. I add that table into DataSet of Winforms Devexpress. While retrieving the data's one column(Amount Paid) getting wrong data's. help to recover this problem. 1st image showing my MS Access Database Table and 2nd image showing DataSet table in Winform Devexpress

This is the SQL Query I used to create the query table in MS Access Database

SELECT InvoiceNumber, 
      (SELECT PaymentTerms FROM PSD_customerPaymentTerms WHERE PSD_customerPaymentTerms.PTId = NewInvoice_1.Terms) AS Terms, 
      InvoiceDate, 
      OurQuote, 
      (SELECT FirstName FROM Employee WHERE Employee.EmployeeId = NewInvoice_1.SalesPerson) AS SalesPerson, 
      (SELECT CustomerName FROM Customer WHERE Customer.CustomerId = NewInvoice_1.CustomerName) AS CustomerName, 
      OrderNumber, 
      GrandTotal,  
      (SELECT SUM(PaymentAmount) FROM Payment_Receipt WHERE Payment_Receipt.InvoiceNumber=NewInvoice_1.InvoiceNumber) AS AmountPaid, 
      GrandTotal-IIf(AmountPaid Is Null,0,AmountPaid) AS AmountDue
FROM NewInvoice_1;

1st Image enter image description here

2nd Image enter image description here

No correct solution

OTHER TIPS

Clearly the binding for the AmountPaid column isn't set properly. I suggest you start by checking the column's FieldName property. If it's set correctly then your problem is likely an event that changes the cell text or some code changing the value in the underlying datasource at runtime.

If you can't find anything there, I suggest you share some code so that you can get more help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top