Page 1 of 2

Signs at numeric values

Posted: Fri May 02, 2008 11:04 am
by sector7g
Hi,

I have a report that shows prices from an invoice. The customer wants the negativ sign at the end of the numeric value.
No problem, I used the format "n-".
The values in the report are now looking something like this:
123,12
123,12-
123,12

but it should look like this:

123,12
123,12-
123,12

Font is "Courier New", Orientation is right.

so I remove the format and printed the value as string in the following form:

{([Table].field >= 0)? [Table].field+" ":Abs([Table].field)+"-"}

But when rendering the report somewhere has to be a call of the trim method to my string?
The trailing space is removed.
How can I format my list properly?
Or how can I prevent the string for trimming.

Ralf

Signs at numeric values

Posted: Fri May 02, 2008 1:24 pm
by Vital
Hello Ralf,
sector7g wrote:Hi,

I have a report that shows prices from an invoice. The customer wants the negativ sign at the end of the numeric value.
No problem, I used the format "n-".
The values in the report are now looking something like this:
123,12
123,12-
123,12

but it should look like this:

123,12
123,12-
123,12

Font is "Courier New", Orientation is right.

so I remove the format and printed the value as string in the following form:

{([Table].field >= 0)? [Table].field+" ":Abs([Table].field)+"-"}

But when rendering the report somewhere has to be a call of the trim method to my string?
The trailing space is removed.
How can I format my list properly?
Or how can I prevent the string for trimming.

Ralf
You can format your values directly with help of method ToString:

{[Table].field.ToString("Your format")}

Thank you.

Signs at numeric values

Posted: Sat May 03, 2008 2:09 am
by sector7g
Hi,

I have just been seen, in my post I have got the same Problem (but with leading spaces ;-):

Until now it looks like this
_123,12
_ 123,12-
_123,12

but it should look like this:

_123,12
_123,12-
_123,12

My problem is: Somebody is calling "Trim" to my numeric value. The trailing sign " " disapeared.
I also have tried
Format("{0:N2 }", Field)
Format("{0:N2-}", Field)
The "-" is printed, the " " is not.



Ralf


Signs at numeric values

Posted: Sun May 04, 2008 6:08 am
by sector7g
Now the last try:

Until now it looks like this
. 123,12
.123,12-
. 123,12

but it should look like this:

.123,12
.123,12-
.123,12

Ralf

Signs at numeric values

Posted: Sun May 04, 2008 6:50 am
by Edward
Ok, we've understood your request.

We'll post a message in this topic when a workaround is available.

Thank you.

Signs at numeric values

Posted: Mon May 05, 2008 2:00 pm
by Vital
Hello,

Problem solved. Patch will be available in build from 6 May.

Thank you.

Signs at numeric values

Posted: Mon May 05, 2008 3:34 pm
by sector7g
Cool,

Thank you very much.

Ralf

Signs at numeric values

Posted: Mon May 05, 2008 4:33 pm
by Vital
Hello,

Some new information. By default measure trailing spaces will be ignored. You need enable it with help of:

Code: Select all

StiOptions.Engine.MeasureTrailingSpaces
Thank you.

Signs at numeric values

Posted: Wed May 07, 2008 10:52 am
by sector7g
Hi,

I set the new StiOptions.Engine.MeasureTrailingSpaces Property to true.
With the Designer and with the Method Show I can see the trailing spaces, but when I start the to render and then call ExportDocument the trailing spaces disappears again.

Ralf

Signs at numeric values

Posted: Wed May 07, 2008 10:00 pm
by Vital
Hello Ralf,
sector7g wrote:Hi,

I set the new StiOptions.Engine.MeasureTrailingSpaces Property to true.
With the Designer and with the Method Show I can see the trailing spaces, but when I start the to render and then call ExportDocument the trailing spaces disappears again.

Ralf
This is problem because some of file formats (for example Excel, Word) automatically remove trailing spaces. At this moment we try to find way how to solve this problem.

Thank you.