Leave feedback
  • Question

    Format negative value in StoryTeller

Enter a new topic
  • Hanna Nilsson Hanna Nilsson
    0 likes 2660 views

    Hi,

    I have an issue when format negative value in Story Teller.

    The input format is: -596

    In the properties window  I use format: num.integer(sv-SE){}

    But no negative sign are printed out in the output-file.

    How should I use the format rules to get negative sign.

    Thanks,

    Hanna Nilsson

    Tuesday 26 June, 2012
  • Best Answer
    David Bares David Bares OpenText Employee Administrator StreamServe Employee
    1 likes

    Isn't it possible that you are fighting a problem on a PCL or AFP printer?

    Picture clause engine used for formatting the number returns Numeric minus unicode (U+2212) for negative sign. The reason is that it has exactly the same width as plus sign. The standard hyphen-minus (U+002D) has about half width.

    But there are problems on some devices that the fonts or code pages do not contain this unicode. Solution to that is device specific.

    You will easily find if this is the case by creating the same output to PDF. If that is correct with minus sign, you need to solve the device problem.

    Wednesday 27 June, 2012

    Attached files

  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    This should point you in the right direction...

    Tuesday 26 June, 2012
  • Hanna Nilsson Hanna Nilsson
    0 likes

    Thanks!

    I have tried some different formatting rules eg. num(sv-SE){sz,zz9}

    but I get the result --> the negative sign are replaces by a space in the output-file

    The format displayed in Format Sample are displayed correct.

    Tuesday 26 June, 2012
  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    Have you triedthe following which will include the decimals?

    num(sv-SE){sz,zzz,zzz,zz9.99}

    Tuesday 26 June, 2012
  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    BTW: num(da-DK){sz,zzz,zzz,zz9.99}

    will give you:

    -10.450,50 if you are looking for replacement of the ',' and the '.'.

    Tuesday 26 June, 2012
  • Hanna Nilsson Hanna Nilsson
    0 likes

    Hi, I have tried to include decimals but I get the same result, negative sign hare replaced with a space.

    Tuesday 26 June, 2012
  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    Are you using a small "s" or a big "S"?

    Please use small. From the documentation:

    S is the picture symbol for a minus sign if the number is negative, and a space otherwise; when
    input parsing, it is also the picture symbol for a plus sign if the number is positive.

    s is the picture symbol for a minus sign if the number is negative, and nothing otherwise; when
    input parsing, it is also the picture symbol for a plus sign if the number is positive.

    Tuesday 26 June, 2012
  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    1 likes

    Isn't it possible that you are fighting a problem on a PCL or AFP printer?

    Picture clause engine used for formatting the number returns Numeric minus unicode (U+2212) for negative sign. The reason is that it has exactly the same width as plus sign. The standard hyphen-minus (U+002D) has about half width.

    But there are problems on some devices that the fonts or code pages do not contain this unicode. Solution to that is device specific.

    You will easily find if this is the case by creating the same output to PDF. If that is correct with minus sign, you need to solve the device problem.

    Wednesday 27 June, 2012

    Attached files

  • Hanna Nilsson Hanna Nilsson
    0 likes

    The output format are afp. When i view the output in BTB-browser I couldnt see the negative sign. When I change to another afp-viewer I can see the negative sign. Nothing wrong wiht my formatting :)

    Wednesday 27 June, 2012
  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    1 likes

    To see the Minus character correctly in BTB you need to go to their GCGID.Def file and fix the line with SA000000 from 002D to 2212

    SA000000 = 2212 ; Typographic Minus Sign

    Wednesday 27 June, 2012
  • David Bares David Bares OpenText Employee Administrator StreamServe Employee
    1 likes

    ...and you would need to fix Strs mapping table u2chname.txt by adding line (with tabs as separators)

    U2212 SA000000 minus minus minus sign

    Wednesday 27 June, 2012
Next