This is a migrated thread and some comments may be shown as answers.

Formatting multiple values in an expression

1 Answer 877 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 09 Mar 2016, 06:36 PM

I have a single cell that has data the following data:

Weight  <unit of measurement> @ speed <unit of measurement>

Example:  "40000 lbs @ 65 mph"      "18143 kg @ 105 km / h"

Expression example:

=Fields.weight + " " + IIf(uom = "metric", "kg", "lbs") + " @ " ......

I am trying to find a way to do number formatting to add the thousands separator. Is there a way to format one specific field in an expression? I am trying to keep most of the formatting to be as native as possible, instead of user functions, in case the culture changes from "," to ".", etc.

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 11 Mar 2016, 06:32 PM
Hello Scott,

You can use the built-in Format function and a standard numeric format string. Depending on the formatting string, decimal and group separators will be obtained from the current thread's culture information.

Other approach is to use a custom function and format the values in code, includes using invariant formatter on conversion, replacing and formatting strings. If you need custom functions in the Standalone Designer tool, please follow the steps in Extending Report Designer.


Let us know if you need any further help.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Scott
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or