This example demonstrates how to calculate a weighted average function. To do this, create a calculated field and in its expression, refer to two data fields and separate them using a special sign (such as "|").
Then, create a summary label bound to this calculated field with a custom summary function defined. Handle the label's SummaryGetResult event to parse the calculated field's value and calculate a weighted average function.
Question Comments
Added By: Abdul Shareef1 at: 3/12/2013 3:13:38 PM
Can you please explain me how to do the following step for two numeric fields?
To do this, create a calculated field and in its expression, refer to two data fields and separate them using a special sign (such as "|").
Added By: George (DevExpress) at: 3/14/2013 5:50:49 AMPlease open this project in Visual Studio, and in the Field List panel, right-click the "fieldWeight" calculated field. In the invoked popup menu, select "Edit Expression...", which runs the field Expression editor. In this editor, you can view the following expression: ToStr([UnitPrice] * [UnitsInStock]) + '|' + ToStr([UnitPrice])
Added By: Farukh Sharipov at: 6/14/2013 4:09:28 PMCan you explain more how to do two numeric fields? Maybe attach screencast?