Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Number Format Setting Separators, Decimal and Thousand not defaulting to values from ThousandSep and DecimalSep.

We would like to use the same qvs document for all of our customers using one of our products. 

However there are display differences in different countries for dates and numbers etc.

So we would like to minimise the number of changes we have to make when creating the qvs document for each market.

For example in some countries we would like to have in the load script,

SET ThousandSep=' ';

SET DecimalSep=',';

and in others,

SET ThousandSep=',';

SET DecimalSep='.';

So that numbers display correctly for each country.

Unfortunately whenever we do this it seems to have little or no effect on how the numbers are displayed.

The reason for this seems to be that when we use the Number tab of the document properties and set all the numeric fields to be a type of number. QV copies the current value in ThousandSep and DecimalSep into the Separators field for Decimal and Thousand.

When we save the document and do a reload all looks fine.

If we change the values in ThousandSep and DecimalSep and do another reload then the numbers are still displayed in the old format and have totally ingnored the new values in ThousandSep and DecimalSep.

We seem to have to go through all the fields in our documnet and manually reset the format.

Is this how QlikView is supposed to handle number formatting or am I missing something, to me it looks like ThousandSep and DecimalSep are pretty pointless.

I have also tried using the 'System' button on the Number tab of the document properties for each numeric field,  but these only seems to set the number format to that of the developers PC and not the users PC.

I have even tried to put the value of a variable into the Separators field for Decimal and Thousand on the Number tab of the document properties but again this does not appear to work.

Does anybody have any ideas of how I can do this without having to reset the format of every display field each time we produce a new version or update to the qvs document.

Thanks Dave.

2 Replies
Not applicable
Author

Any advice anyone? 

I've has another go at trying to solve this and using the number format settings

SET ThousandSep=',';

SET DecimalSep='.';

and it still does not seem to work automatically, and correctly no matter what I try.  The only way I seem to be able to get the document to use the new settings in ThousandSep and DecimalSep for the number display format and not at the same time corrupt the number, is to reset the number format on every field in the document and every chart object that has changed the number display format. 

This is quite time consuming and error prone compared to the simple changes required for changing the date format where changing the value in DateFormat can change the date format used everywhere.

marcus_sommer

This could be a bug or designed as feature, because doing directly settings have a higher priority and will not override again through changed default settings ... Perhaps it is a solution to reset or fix the number format with a macro like this:

set fld=ActiveDocument.GetField("Amount")

set fprop = fld.GetProperties

fprop.NumberPresentation.Dec = asc(".")

fprop.NumberPresentation.Fmt = "# ##0.00"

fprop.NumberPresentation.nDec = 2

fprop.NumberPresentation.Thou = asc(" ")

fprop.NumberPresentation.Type = 11       'fixed decimal

fprop.NumberPresentation.UseThou = 1

fld.SetProperties fprop

in a loop for each app and for each field. This example is from APIGuide.qvw

- Marcus