When I open an XRDesignFormEx on my report, add calculated fields, rename them, and then dispose of the designer, exactly at that time both the Name and the DisplayName fields of the CalculatedField objects are cleared. When I re-open the designer, the calculated fields are once again named calculatedField1, calculatedField2, … and the data bindings to the calculated field are all broken.
Steps to Reproduce:
- Unpack the attached project.
- Edit Form1.cs and replace C:\Tests\Db1.mdb by the full path to the included Db1.mdb.
- Run the project
- Press "create data set and report".
- Press "Edit report". This will open the end user designer.
- Go to the Field List.
- Right click on "Table" and select "Add calculated field".
- In the property grid, change the "(Name)" property to "calculatedFieldFoo"
- Go to the report explorer.
- Right click on xtraReport1 and select Insert Band -> Detail.
- From the Tool Box, drag a Label into the detail band.
- In the property grid for the new Label control, go to (Data Bindings) -> Text -> Binding. Set the binding to Table -> calculatedFieldFoo.
- Close the designer (don't save).
- Press "Edit report" again.
Actual Results:
The calculated field is now called "calculatedField1", the text of the label in the design view shows "[]", and the binding of Text property of the the label in the property grid shows "dataSet1 - Table.".
Note that in the code of the demo application, the data is lost during the call to designForm.Dispose();. When I add a Watch for myReport.CalculatedFields[0].Name and myReport.CalculatedFields[0].DisplayName, they are OK before the Dispose() call, and they are empty ("") afterwards.
Expected Results:
The calculated field should still be called "calculatedFieldFoo". The binding of the label should still be to that particular calculated field.
Note that the attached project actually uses 8.2.7, I'm sorry about that, this was an older test app that I used for earlier bug reports as well. However, if you upgrade it to 8.3.3 the problem is still there, so the problem still stands.