[DevExpress Support Team: CLONED FROM T302035: How best to report on child collection items in a XAF web report]
Thank you! That sounds like it will work, but could you please point me to some documentation on how to use calculated fields in the web report designer? I've found documentation for the windows version, but I can't find how to place a calculated field on a report (or link a text box to a calculated field). I know this must be super simple, but I can't find it.
I can create a calculated field (under the "Data" group when the report is selected). However, once I've done that, I cannot find that calculated field when trying to link a text box to the calculated field using the "Data Binding" selection box.
Web Report Designer does not provide the capability to create the OnGetValue script for CalculatedFields
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
- v15.2.4Download Official Update
- v15.1.8Download Official Update
Hi Richard,
Please refer to the Field List > Manage Calculated Fields and Parameters help topic to learn how to operate calculated fields in the web report designer. After that, use the calculated field as a regular field from the field list. Anyway, if you need any further assistance with this, please describe the issue you have faced in greater detail: Make a detailed screencast that illustrates how to reproduce this issue from scratch. For example, use the Jing tool for this purpose.
Thank you, that documentation provided some help.
However, I still can't figure out how to add a script for the Calculated Field. I looked at the following two KB articles and tried to replicate the code from them to generate a value on the report (i.e. from a collection), but I can't event get simple text to display.
https://www.devexpress.com/Support/Center/Question/Details/T302035
https://www.devexpress.com/Support/Center/Question/Details/B191224
I created a calculated field called "NotesNMinusOne". However, I don't know how to generate a "OnGetValue" script for it. In the script editor in the control dropdown, the calculated field does not show up. However, I assumed that maybe I just needed to add a OnGetValue function, so I added the following:
using WindwardDataObjects.BusinessObjects;
private void NotesNMinusOne_GetValue(object sender, GetValueEventArgs e) {
e.Value = "Testing!!!";
}
Even after doing this, the "Testing!!!" does not get displayed when I drag the Calculated Field onto the report. What am I missing here?
Note that I AM able to get the BeforePrint event to update the label, but I would prefer to add code to the calculated field(s) to make the report creation much easier.
Thanks!
Hi Richard,
The OnGetValue script is not available in the current version. I have informed our developers of this misbehavior, and they are researching it. You will receive an automatic message once the status of this issue is changed.