none
Convert negative decimal value in blank value

    Question

  • Hello all,
    in a textbox of my report I can have these decimal numbers:

    -1
    -1,0
    -1,00
    -1,000

    How can I show an empty cell insted (blank)?

    Thanks a lot.

    Luis

    Tuesday, September 10, 2013 6:35 PM

Answers

  • Hi Ciupaz,

    Sorry for the delay.

    From your description, you want to show the values -1, -10, -100 ... as blank value. In Reporting Services, there is no such an expression to get the value -1, -10, -100 ... so I am afraid you need use the expression below to achieve you requirement.
    =IIf(Fields!Amount.Value = -1 OR Fields!Amount.Value = -10 OR Fields!Amount.Value = -100 OR Fields!Amount.Value = -1000 OR Fields!Amount.Value = -10000 OR Fields!Amount.Value = -100000,"", Fields!Amount.Value)

    If you have any questions, please feel free to ask.

    Regards,
    Charlie Liao

    If you have any feedback on our support, please click here.


    Charlie Liao
    TechNet Community Support

    • Marked as answer by Ciupaz Monday, September 16, 2013 12:23 PM
    Monday, September 16, 2013 1:57 AM
    Moderator

All replies

  • Hi Ciupaz,

    Assume Fields!ID.Value is your field that showing negative values. Use the below expression to solve your issue:

    =IIF(Left(Fields!ID.Value,1)= "-","",Fields!ID.Value)

    Thanks,

    Vishal

    Tuesday, September 10, 2013 7:39 PM
  • Hi

    you could do this

    =IIf(Fields!Amount.Value < 0, "", Fields!Amount.Value)


    Si se solucionó tu consulta no olvides marcar la respuesta de esta forma mantendremos el orden en el Foro.

    José Carlos Barba Gutierrez
    Lima - Perú
    Saludos

    Tuesday, September 10, 2013 7:44 PM
  • You may do
    =IIf(Fields!Amount.Value < 0, Nothing, Fields!Amount.Value)

    Thanks

    Remember to mark as an answer if this post has helped you.

    Tuesday, September 10, 2013 8:35 PM
  • Sorry, I cannot use these snippet, because I still have negative values,
    for example:

    -212
    -50

    and in this case I have to mantain these negative values.

    The conversione to blank should happen only for -1 (or -1,0 - -1,00 - ...).

    L

    Wednesday, September 11, 2013 7:46 AM
  • Then try

    =IIf(Fields!Amount.Value = -1, Nothing, Fields!Amount.Value)


    Remember to mark as an answer if this post has helped you.

    Wednesday, September 11, 2013 1:05 PM
  • Hi Ciupaz,

    Sorry for the delay.

    From your description, you want to show the values -1, -10, -100 ... as blank value. In Reporting Services, there is no such an expression to get the value -1, -10, -100 ... so I am afraid you need use the expression below to achieve you requirement.
    =IIf(Fields!Amount.Value = -1 OR Fields!Amount.Value = -10 OR Fields!Amount.Value = -100 OR Fields!Amount.Value = -1000 OR Fields!Amount.Value = -10000 OR Fields!Amount.Value = -100000,"", Fields!Amount.Value)

    If you have any questions, please feel free to ask.

    Regards,
    Charlie Liao

    If you have any feedback on our support, please click here.


    Charlie Liao
    TechNet Community Support

    • Marked as answer by Ciupaz Monday, September 16, 2013 12:23 PM
    Monday, September 16, 2013 1:57 AM
    Moderator
  • Thank you Charlie, this could be a solution.

    Luis
    Monday, September 16, 2013 12:25 PM