Negative Value Format Not Working After Updating Verison

1 Answer 28 Views
.NET Framework Binding Conditional Formatting Expressions Report Designer (standalone)
Neel
Top achievements
Rank 1
Neel asked on 24 May 2024, 01:05 PM | edited on 03 Jun 2024, 12:08 PM

Hello, 

I have .trdp files that have a textbox with a culture set as 'en-US' and the format for the textbox is '{0:C2}'.

There is no such change in the file.

It was rendering negative currency values properly until I updated  Telerik. Reporting  Nuget version from  NuGet '17.2.23.1010' to '17.2.23.1114' in my .Net 7 project.

Please, guide me if I am missing something.

Neel
Top achievements
Rank 1
commented on 27 May 2024, 06:55 AM | edited

Just for an update, I tried the latest Nuget version '18.1.24.514' with the report designer 'Report Designer 2024 Q2 for .Net'. 
Still the same issue.
It shows value i.e. -$2.55 instead of ($2.55).

1 Answer, 1 is accepted

Sort by
0
Accepted
Momchil
Telerik team
answered on 29 May 2024, 08:08 AM

Hi Neel,

Thank you for reporting this.

Indeed, the Standalone Report Designer for .NET displays negative currency with a minus instead of parenthesis.

However, this does not seem to have been introduced with the 17.2.23.1114 Reporting version. Instead, it appears to be specific to the .NET Core implementation because the .NET Framework version of the Standalone Report Designer behaves as expected.

I tested the .NET Core implementation with versions as far back as R3 2022 SP1 but the 'en-US' culture consistently formats negative amounts with a minus prefix.

The .NET Framework and .NET Core Reporting implementations should behave as closely as possible which is why I have logged a bug report in our feedback portal about this on your behalf.

The negative currency format does not work in .NET Core (telerik.com)
I am also updating your account's Telerik Points as a token of gratitude for helping us notice this.

In the meantime, I can suggest suggest the following alternatives.

  • Create a custom user function that formats the numbers with the desired CurrencyNegativePattern.
  • Use an expression to format the numbers. For example, "= Fields.Val < 0 ? Format("(${0})", -Fields.Val) : Format("${0}", Fields.Val)"

I hope this helps.

Best Regards,
Momchil
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Neel
Top achievements
Rank 1
commented on 29 May 2024, 08:39 AM

Hello, thanks for the response and alternative temporary solution.

Tags
.NET Framework Binding Conditional Formatting Expressions Report Designer (standalone)
Asked by
Neel
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or