DevExpress XtraReport currency thousand separator - winforms

I have XtraReport with XtraLabel in detail band for display currency, ex: I have 2000000 and want to display it as 2.000.000, how can I do it?

You can do this by setting the FormatString property of 'Text` data binding as below.
xrLabel.DataBindings["Text"].FormatString = "{0:C}";
you can set refer Standard Numeric Format Strings and Custom Numeric Format Strings to specify format string that you want to apply.
References:
Formatting numeric values as Currency for an XrLabel
XRLabel - Setting FormatString during Report Generation

Related

How to format x labels for a datetime scale

I have this chart https://playground.anychart.com/D7okDBpO/4
AFAIK the x labels are automatically formatted according to the anychart.format.outputDateFormat(), so the only way to format them is to call anychart.format.outputDateFormat("someformat"). The problem is that I have multiple charts on a page and they all need different formats, and changing this global setting from multiple charts leads to concurrency issues (on some charts, the x labels are formatted with multiple different formats).
Is there some other way to format them? Having access to the original data from the formatting function for x labels would be enough, but it's not there:
chart.xAxis().labels().format(function () {
console.log(this); // only contains the already formatted date
return this.value;
});
this.tickValue contains unformatted dates, so you can use the {%tickValue} and {%x} string tokens to format the axes labels and the tooltip respectively. Please check this sample, pay attention to lines 35-36.

DevExpress 12.2.7 summary format string not work

I usually use string.Format(arg, object)in Before Print of XrTableCell to format string as decimal dotted.
In the bottom of each page I have one Group Footer to summary the page.
But in the summary XrTableCell (xrTableCell50) I can't format my string, when debugging, it's value is not the printed value too!, and the printed is without the dots

Adding new date formats to ExtJS

Ext.Date contains formats a and A for am/pm or AM/PM, respectively.
I want to add a format, call it b, for a/p without the m. I have searched parseFunctions and formatFunctions but did not find where the old format is defined.
Can anyone shed some light on this matter?
Have a look at formatCodes in Ext.Date:
The base format-code to formatting-function hashmap used by the format
method. Formatting functions are strings (or functions which return
strings) which will return the appropriate value when evaluated in the
context of the Date object from which the format method is called. Add
to / override these mappings for custom date formatting.

Getting a currency format pattern from AngularJS filter

I'm interested in creating a filter that would accept an amount, ISO 4217 currency code, and fraction size, and return the amount in that format. I noticed that AngularJS has goog.i18n.currency.getGlobalCurrencyPattern in i18n/closure/currencySymbols.js, but I'm relatively new to Angular and not sure if it is possible to use it?
The currency pattern and symbols are just that. It determines how to display a number. It will not convert it from XXX to XXX. You will have to do the converting part based on the current conversion rates.
As far as using the built-in currency formatting, there are multiple ways: in the template, in the code.
In the template:
<div>{{myCurrencyValue | currency:'XXX'}}</div>
In the code:
var formatted = $filter('currency')(myCurrencyValue, 'XXX')
In both cases, 'XXX' is optional [and is symbol] and will use the default currency for current locale
Example: http://jsfiddle.net/TheSharpieOne/N7YuP/
More information can be found here: Currency Docs
UPDATE
Example with ISO 4217 codes using custom filter: http://jsfiddle.net/TheSharpieOne/N7YuP/3/
Note: ISO 4217 doesn't dictate the currency symbols, I used this for symbol reference and mapped them.

Custom Time Formatting what does 0: do?

Custom Date and Time Format Strings on MSDN
Link above seems to use {0:MM/dd/yy H:mm:ss zzz} a lot.
I understand all the letters and formatting options but I can't seem to find what the preceding "0:" is for?
The {0} is a composite formatting placeholder, meaning the first item in the format value list. For details, see this MSDN article, in particular, the section called "Composite Formatting" near the bottom, or the larger article specifically about Composite Formatting. But, to summarize:
In .NET there are two kinds of string formatting you can do: ToString formatting and composite formatting. Both of them use the same custom format string syntax.
When you have a single object, like a DateTime variable, and you call DateTime.ToString() on that object, you can pass a formatting string and it will apply to that object, and format it according to your pattern. But if you have more than one object and you want to build a complex string that includes their values, you instead call String.Format. That function expects a "format string" that contains placeholders where the variable bits go, which look like {0:g} or {5:MM/dd/yy} or something. The remainder of the parameters to String.Format is a list of variables. The {0} placeholder is the first variable, {5} is the 6th, etc.

Resources