Bug Report T305167
Visible to All Users

Web Report Designer does not provide the capability to create the OnGetValue script for CalculatedFields

created 9 years ago

[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.

Answers approved by DevExpress Support

created 9 years ago

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.

    created 9 years ago

    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.

      Comments (2)
      RM RM
      Richard Millard 9 years ago

        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!

        DevExpress Support Team 9 years ago

          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.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.