locked
Expression - How Do I replace a value with another value RRS feed

  • Question

  • User-501297529 posted

    I am using an expression where I want to replace the First(Fields!inv_str_cust_seq.Value) with First(Fields!inv_cust_seq.Value) if first value - First(Fields!inv_str_cust_seq.Value) is NULL. The code below I'm using doesn't seem to work. 

    =IIf(IsNothing(First(Fields!inv_str_cust_seq.Value)), First(Fields!inv_cust_seq.Value),First(Fields!inv_str_cust_seq.Value))

    Wednesday, April 10, 2013 11:31 AM

Answers

  • User-501297529 posted

    I figured this out. I had to change the stored procedure to accept null values for this field.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 11, 2013 10:39 AM

All replies

  • User-501297529 posted

    ANyone with any ideas on this.

    Wednesday, April 10, 2013 2:37 PM
  • User-67082742 posted

    Hi,

    Your Expresiion is correct. Its just that SSRS behaves that way sometimes for null values. Try using Len( First(Fields!ddd...)) >0  instead of IsNothing. that shud work.

     

    Please mark as answer if this helps!

    Thanks!

    AB

    Thursday, April 11, 2013 4:07 AM
  • User-501297529 posted

    I tried using LEN and it didn't work. I used this:

    =IIf(Len(First(Fields!inv_str_cust_seq.Value))=0, First(Fields!inv_cust_seq.Value),First(Fields!inv_str_cust_seq.Value))
    Thursday, April 11, 2013 9:04 AM
  • User-501297529 posted

    I figured this out. I had to change the stored procedure to accept null values for this field.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 11, 2013 10:39 AM