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 <span>arithmetic operations</span>.
You can try to use other methods to get a calculated field and total it:
1) <b>Add extra data filed to SQL query</b> of the report's data source, like this:
<font face="Courier New" size="2">SELECT Products.ProductName,
[Order Details].UnitPrice * [Order Details].Quantity AS SubTotal
</font>After that you can use created SubTotal field in you report.
2) <b>Adds a new custom field to the report's fields collection</b> in the DataInitialize and calculate it in the FetchData at run-time. Please take a look at the following sample:
<font size="3"><font face="Courier New" size="2">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 <font size="3">ExtField </font>field in you report.
I have attached a small sample that demonstrates these methods.