Signs at numeric values

Stimulsoft Reports.NET discussion
sector7g
Posts: 26
Joined: Tue Apr 29, 2008 9:32 am
Location: Germany

Signs at numeric values

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Signs at numeric values

Post 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.
sector7g
Posts: 26
Joined: Tue Apr 29, 2008 9:32 am
Location: Germany

Signs at numeric values

Post 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

sector7g
Posts: 26
Joined: Tue Apr 29, 2008 9:32 am
Location: Germany

Signs at numeric values

Post 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
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Signs at numeric values

Post by Edward »

Ok, we've understood your request.

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

Thank you.
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Signs at numeric values

Post by Vital »

Hello,

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

Thank you.
sector7g
Posts: 26
Joined: Tue Apr 29, 2008 9:32 am
Location: Germany

Signs at numeric values

Post by sector7g »

Cool,

Thank you very much.

Ralf
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Signs at numeric values

Post 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.
sector7g
Posts: 26
Joined: Tue Apr 29, 2008 9:32 am
Location: Germany

Signs at numeric values

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Signs at numeric values

Post 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.
Post Reply