Wednesday, March 28, 2012
Numeric Formatting
I'd like negative numbers to be enclosed in brackets and the decimals to
lign up (vertically) with the positive numbers (right justified).
I have used, Format ="#,##0.00 ;(#,##0.00); ", but the space is trimmed. Any
ideas ?
Thanks,
ClaudeI am not in front of Visual Studio so I cannot test this...
My idea is that you could use an expression to alter the right padding of
the numbers. If they are <0 then 2pt else 4pt (or whatever the width of the
bracket).
This is a little hackish because if you ever change the font, size or
anything that padding would change.
"Claude" <Claude@.discussions.microsoft.com> wrote in message
news:AC41BE0F-895D-4C2C-A1CA-0309F18A29EC@.microsoft.com...
> How can I achieve the following:
> I'd like negative numbers to be enclosed in brackets and the decimals to
> lign up (vertically) with the positive numbers (right justified).
> I have used, Format ="#,##0.00 ;(#,##0.00); ", but the space is trimmed.
> Any
> ideas ?
> Thanks,
> Claude|||You are spot on Joe. Thanks for the help.
Claude
"Joe L" wrote:
> I am not in front of Visual Studio so I cannot test this...
> My idea is that you could use an expression to alter the right padding of
> the numbers. If they are <0 then 2pt else 4pt (or whatever the width of the
> bracket).
> This is a little hackish because if you ever change the font, size or
> anything that padding would change.
>
> "Claude" <Claude@.discussions.microsoft.com> wrote in message
> news:AC41BE0F-895D-4C2C-A1CA-0309F18A29EC@.microsoft.com...
> > How can I achieve the following:
> >
> > I'd like negative numbers to be enclosed in brackets and the decimals to
> > lign up (vertically) with the positive numbers (right justified).
> >
> > I have used, Format ="#,##0.00 ;(#,##0.00); ", but the space is trimmed.
> > Any
> > ideas ?
> >
> > Thanks,
> > Claude
>
>
Monday, March 12, 2012
Number Format
When setting the format property for a textbox containing a number the first parameter relates to a positive number, the second negative and the third to zero.
eg #,###; (#,###); 0
Is there a way of also formatting Null values in the same way without writing custom code?
Could you do an isnull in your query so that you don't get NULL showing on your report?
Jarret
|||I could. Just means I have to either type this in for every column in my dataset or every textbox (instead of doing a multi-select). Sounds a bit lazy I know but I have a lot of reports and columns to go through.
Mark
|||Sorry Mark, I can't seem to find anything that will replace NULL with a 0 just by changing using the format code.
I think you're best bet is using the ISNULL or an expression, but either way, you'd have to change each field.
Jarret