Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am already adding tags & comments to QV Fields through an external file; using following code (Example taken from the QV Help):
tagmap:
mapping Load * inline [
a,b
Alpha,MyTag
Num,MyTag
];
tag fields using tagmap;
commentmap:
mapping load * inline [
a,b
Alpha,This field contains text values
Num,This field contains numeric values
];
comment fields using commentmap;
Is there a similar way to control the formatting of my fields? in order to overwrite the properties given in the following screen:
Settings > Document Properties... > Number
For example, I want all my measures to be shown with 2 decimals, and blank separator for thousands
Hello,
I don't know a way to automate that in script. But you could do that with a macro. In the API (qvw in your installation folder), you have an example to format a field :
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
With a "for" instruction, you could automate this action on a field list.
Maxime S.