Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removed translated content for 'zh'
Sv translation
languageen

Sometimes, you may want to represent the numbers on the report in accounting format.

If the numbers are negative, it will be represented within a bracket with the positive number, e.g. - 500 is represented as (500) in accounting format.

If the numbers are 0, it will be shown as "-".

Here is the sample code for you to transform your number to accounting format. The code of the indicator using is "M_AMOUNT" and the aggregation is SUM.

Code Block
if(M_AMOUNT@SUM == 0) {
  return '-';
}else if(M_AMOUNT@SUM < 0) {
  return '(' + abs(M_AMOUNT@SUM) + ')';
}else {
  return M_AMOUNT@SUM;
}
Sv translation
languageja

レポート上の数字を会計形式で表したい場合があるでしょう。

数値が負の場合、括弧内に正の数値で表されます。例えば、-500は会計形式では(500)として表されます。

数値が0の場合、「-」として表示されます。

このサンプルコードは、数字を会計形式に変換するものです。インジケータのコードは"M_AMOUNT"を使用し、集計はSUMです。

Code Block
if(M_AMOUNT@SUM == 0) {
  return '-';
}else if(M_AMOUNT@SUM < 0) {
  return '(' + abs(M_AMOUNT@SUM) + ')';
}else {
  return M_AMOUNT@SUM;
}
Sv translation
languagede

Manchmal ist es wünschenswert, die Zahlen auf dem Report im Buchhaltungsformat darzustellen.

Wenn die Zahlen negativ sind, wird sie innerhalb einer Klammer mit der positiven Zahl dargestellt, z.B. wird - 500 als (500) im Buchhaltungsformat dargestellt.

Wenn die Zahlen 0 sind, wird sie als "-" angezeigt.

Hier ist der Beispielcode, mit dem Sie Ihre Nummer in das Buchhaltungsformat umwandeln können. Der Code des Indikators mit "M_AMOUNT" und die Aggregation ist SUM.

 

Code Block
if(M_AMOUNT@SUM == 0) {
  return '-';
}else if(M_AMOUNT@SUM < 0) {
  return '(' + abs(M_AMOUNT@SUM) + ')';
}else {
  return M_AMOUNT@SUM;
}