Replied 4 August 2017, 3:02 pm EST
What kind of data type do the BasisIn and BasisOut fields have? Please make sure that they have the compatible type for arithmetic operations
You can try to use other methods to get a calculated field and total it:
1) Add extra data filed to SQL query
of the report's data source, like this:SELECT Products.ProductName,
[Order Details].UnitPrice * [Order Details].Quantity AS SubTotal
After that you can use created SubTotal field in you report.
2) Adds a new custom field to the report's fields collection
in the DataInitialize and calculate it in the FetchData at run-time. Please take a look at the following sample:Private Sub ActiveReport_DataInitialize()
Private Sub ActiveReport_FetchData(EOF As Boolean)
Me.Fields("ExtField").Value = Me.Fields("UnitPrice").Value * Me.Fields("Quantity").Value
You can use created ExtField
field in you report.
I have attached a small sample that demonstrates these methods.