Reputation: 4632
this one is my report
This is my result (but iddescripcion is not visible)
my question is.
how do i get when iddescripcion=1,3,5,8 or 10 then valor is going to have this format 10,000 (not decimals)
when iddescripcion=2,4,6, or 9 then valor is going to have this format 1,000.0 or 3,000.1( one decimal)
and when iddescripcion=7,11 then valor is going to have this format $2,389,012 (not decimalsa and $ before)
i believe the format i need add it at here but i do not have any idea how to do it..
Upvotes: 0
Views: 1770
Reputation: 39566
You can apply condition formatting using a Switch
or IIf
statement in the Text Box Expression value.
I put a simple example together using the following expression:
=Switch(Fields!iddescripcion.Value = 1 or Fields!iddescripcion.Value = 2, Format(Fields!valor.Value, "N0")
, Fields!iddescripcion.Value = 3 or Fields!iddescripcion.Value = 4, Format(Fields!valor.Value, "N1")
, Fields!iddescripcion.Value = 5 or Fields!iddescripcion.Value = 6, Format(Fields!valor.Value, "$#,#"))
Basically just applying Format
to valor based on iddescripcion for each row. This works for some simple data:
Hopefully you can adapt this for your example.
Upvotes: 1