Help to change number format | Need to adjust data model for Interest note?


I have two questions:

  1. Is it possible to change number format from “1,000.00” to “1000.00”, in that case how?
  2. I would like to add a customer reference to the Interest note-template, but do not find it in the standard data model, have I missed something? Or do I need to manually add this field to the standard model?

Best regards,

Hello @anna, thank you for your questions.

You can format numeric values in different ways.

Formatting numeric values
One way is to apply a custom format. In your case, where you don’t want to display the thousands separators, the format #.00 should be sufficient if the runtime report language is always English:


However, the decimal separator may change if your reports are printed in a language that uses a different decimal separator (e.g., French, German, etc.). If you want to avoid this, you can use the format function and specify the same format (#.00) as the second parameter, while the third parameter specifies the desired language (en-us):


Please note that when using the format function, the Format String value in the Properties dialog should be empty.

My test template with the above Xpath expressions:
CustInterestNote.Report_number formatting.docx (81.8 KB)

In other words, the expression in green that uses the format function should always output the number format you want, even if the runtime language is different from English (for example, German below):

How to add additional data
As for your second question, please take a look at the how-to manual that describes the process of adding custom data to an existing report:

Thank you so much for the help!

I am glad to hear the answer has helped :+1:

I have a further question in this regard. I’m developing reports for Croatia which will sometimes require hr-HR number format for Croatian customer and other times en-CA number format for English customers. The format function does not appear to want to accept a variable containing the language id as the 3rd parameter. Perhaps I am just doing it wrong. Is there a smarter way to apply a language id or “culture” to an entire document? Thanks, Bill

Hi @BillD ,

Without knowing the specifics of the report or the data source, I would say the best way would be to have a languageId value in the data-source that would provide you with the dynamic language ISO code. You would then reference this value inside your format() functions. So you can have for example:

format(SalesInvoiceHeaderExt/Amounts/@NetAmount, ‘n5’, data-source(‘GeneralData’)/CurrentCompany/@LanguageId)

I have included data-source() in this example to show you how would you reference this value in GeneralData if the expressions is bind to the MainData.

Hope it helps.

Thanks Semir!!! That syntax worked! The field I surfaced containing the language-id was in the FreeTextInvoiceHeader and I was trying to format numeric fields in FreeTextInvoiceLines. Adding the data-source to the path fixed it.

That is great to hear @BillD , always happy to help :smile: