Monday, March 19, 2012

Number Formatting Question

Hello,
I have a dataset that looks like this:
0.00
17.00
-25.00
That I want to be displayed like this:
0.00
17.00
25.00-
(Note that there is a trailing space after the positive numbers so that they
will line up properly with the negative ones)
I'm having trouble getting the trailing space to show up. I've tried the
following formatting strings, but none of them seem to work:
#,##0.00 ;#,##0.00-;0.00\ ;
#,##0.00 ;#,##0.00-;0.00 ;
#,##0.00 ;#,##0.00-;0.00' '
#,##0.00 ;#,##0.00-;0.00" ";
Can anyone help me with this?
Thanks in advance,
AmyYou could use an expression in the textbox where you want the data
displayed:
=iif(Fields!<Field Name>.Value >= 0, Fields!<Field Name>.Value & " ",
Fields!<Field Name>.Value & "-")
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"aelk" <aelk@.discussions.microsoft.com> wrote in message
news:9CD9BE54-8CBC-462D-8EA3-6B6C4566BA75@.microsoft.com...
> Hello,
> I have a dataset that looks like this:
> 0.00
> 17.00
> -25.00
> That I want to be displayed like this:
> 0.00
> 17.00
> 25.00-
> (Note that there is a trailing space after the positive numbers so that
> they
> will line up properly with the negative ones)
> I'm having trouble getting the trailing space to show up. I've tried the
> following formatting strings, but none of them seem to work:
> #,##0.00 ;#,##0.00-;0.00\ ;
> #,##0.00 ;#,##0.00-;0.00 ;
> #,##0.00 ;#,##0.00-;0.00' '
> #,##0.00 ;#,##0.00-;0.00" ";
> Can anyone help me with this?
> Thanks in advance,
> Amy|||Unfortunately I've tried that & it makes the 0.00 values come out as 0.
"Bruce Johnson [MSFT]" wrote:
> You could use an expression in the textbox where you want the data
> displayed:
> =iif(Fields!<Field Name>.Value >= 0, Fields!<Field Name>.Value & " ",
> Fields!<Field Name>.Value & "-")
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "aelk" <aelk@.discussions.microsoft.com> wrote in message
> news:9CD9BE54-8CBC-462D-8EA3-6B6C4566BA75@.microsoft.com...
> > Hello,
> > I have a dataset that looks like this:
> >
> > 0.00
> > 17.00
> > -25.00
> >
> > That I want to be displayed like this:
> > 0.00
> > 17.00
> > 25.00-
> >
> > (Note that there is a trailing space after the positive numbers so that
> > they
> > will line up properly with the negative ones)
> >
> > I'm having trouble getting the trailing space to show up. I've tried the
> > following formatting strings, but none of them seem to work:
> >
> > #,##0.00 ;#,##0.00-;0.00\ ;
> > #,##0.00 ;#,##0.00-;0.00 ;
> > #,##0.00 ;#,##0.00-;0.00' '
> > #,##0.00 ;#,##0.00-;0.00" ";
> >
> > Can anyone help me with this?
> >
> > Thanks in advance,
> > Amy
>
>

No comments:

Post a Comment