formatting questions

  • I have a field in a table with the following =Fields!whatever.value & vbCrLf & IIF(Fields.Whenever.value > 0 "RED", "BLACK") but all i get is an error... what i am trying to do is make the second values Text RED if its greater then 0 ... but it doesn't seem to work... is there something i am doing wrong??? please let me know .... thanks


    Moe C

  • Can the second value be a different cell in the same table?  If so, the color can be controlled by the properties of the cell.


    Kindest Regards,

  • Hi,

    To get dynamic color, all you have to do is select the field from table and set the color poperty through expression.

    For example, suppose you have field called UnitPrice, and you want the red color to all of them which has value not greater then zero.

    =IIF(Fields!UnitPrice.Value > 0,

    "Black", "Red")

    Hope this helps.

    Asif

  • The seconds part has to be in the same field as the other one...


    Moe C

  •  

    The Color property of your textbox should have

    =IIF(Fields.Whenever.value > 0, "RED", "BLACK")

    While the Value property will be

    =Fields!whatever.value

     

    The expression you posted may have been failing because of the missing comma (just guessing) but even so with the expression lin the Value property, at best you would display

    1

    BLACK

    HTH

     

  • This wont work it will color both fields that i have in the textbox RED ... i just want to color the single Field!whenever.value not both


    Moe C

  • Just so I'm sure I've got this straight.

    You have 2 fields displayed in the one text box? And you want the colour of the second to be dynamic (and therefore potentially different from the first)? Is that correct?

    The colour property of a textbox (I believe) applies to the whole textbox. If you want a different colour, you'll need a different textbox.

  • That is correct ...


    Moe C

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply