Condtional action.

  • Hi, i want to make conditional action - GoTo Report.

    I've made en expression, but it didnt work.

    I just want to go to another report, if in the name exists such word "regulacji" or "tryb". IRSRZGD -> Name of another report.

    =switch(Fields!Nazwa_pomiaru.UniqueName = "regulacji","IRSRZGD", nothing,

    Fields!Nazwa_pomiaru.UniqueName = "tryb","IRSRZGD", nothing)

    I've also tried with:

    =iif(Fields!Nazwa_pomiaru.Value = "regulacji","IRSRZGD", nothing) - the same.

  • Try

    Switch(Fields!Nazwa_pomiaru.UniqueName = "regulacji", "IRSRZGD", Fields!Nazwa_pomiaru.UniqueName = "tryb", "IRSRZGD", True, Nothing)

    although I think this will work as well

    IIf(Fields!Nazwa_pomiaru.UniqueName = "regulacji" OR Fields!Nazwa_pomiaru.UniqueName = "tryb", "IRSRZGD", Nothing)

    Far away is close at hand in the images of elsewhere.
    Anon.

  • It also doesnt want to work.

  • I'm on SQL2008R2 and it work for me

    What version are you on?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • without R2

  • Ooops my bad, I was testing using Value

    Why are you using UniqueName, is the report using a cube?

    If you put the expression Nazwa pomiaru.UniqueName in another textbox do you get "regulacji", or "tryb"?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Yep. im testing with value, but nothing works. Maybe its a problem with string, i've even change the value of my columns, and reports.

    =Switch(Fields!Pomiary.Value = "1 Pomiar", "Nazwa", Fields!Pomiary.Value = "2 Pomiar", "Nazwa", True, Nothing)

    Anyone?

    // Ok. I've found solution, in database i had char(10), so it reserved memory for 10 digits, so my finally exp. was:

    =Switch(Fields!Pomiary.Value = "1 Pomiar ", "Nazwa", Fields!Pomiary.Value = "2 Pomiar ", "Nazwa", True, Nothing)

  • Glad you solved it 🙂

    Far away is close at hand in the images of elsewhere.
    Anon.

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

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