Calculated fields seem to not work

Posted by: darin on 11 November 2022, 8:18 am EST

    • Post Options:
    • Link

    Posted 11 November 2022, 8:18 am EST

    I have tested this with AR16.2.1 using the sample that was sent to me for a different issue (DataSourceChange) and I am creating a new Calculated field setup as string, value is ‘A’+CategoryID and that displays 66 or 67, etc, and not A1 or A2 like i am expecting. And when i make the value ‘A2’+CategoryID it says:

    Control Script failed for control txtNew11, Source=

    i want the value displayed to be A21 and A22.

    We are actually using it for a new value for a bar code where it should be 420zipcode (so like 42048329) but that is always displaying the script error.

    This worked fine in previous versions of AR, and i can’t find anything in the documentation that this has changed.

    Any help would be appreciated.ScriptFailure.zip

  • Posted 14 November 2022, 1:06 am EST

    Hi Darin,

    Thanks for sharing the control properties in the attached document. I noticed that you are using the following formula for the CalculatedField New1:

    'A' + CategoryID

    Adding an integer value to char converts the output to integer implicitly. I would suggest you to use the following formula:

    "A" + CategoryID

    For reference, I also created a sample report and attached it along with.

    CalculatedField Sample.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels