Nested IIF or SWITCH Statement syntax needed correctly

后端 未结 2 555
借酒劲吻你
借酒劲吻你 2020-12-18 13:42

Can somebody please tell me what I am missing in this formula in SSRS? Or better yet can somebody please write this same thing in a NESTED IIF syntax?

Switc         


        
相关标签:
2条回答
  • 2020-12-18 13:59

    Syntax looks correct at first glance. Most places in SSRS you are required to have = to start your statement. Your code above refers to embedded code for CalculateFraction() Does that exist and is it used successfully elsewhere?

    0 讨论(0)
  • 2020-12-18 14:20

    Try using separated IIF Statements:

    =iif(
        Parameters!StartMonth.Value <= 1 AND Parameters!EndMonth.Value >= 1,
        ReportItems!txtTotal2.Value, Nothing
        ) OR
    
     iif(
        Parameters!StartMonth.Value <= 2 AND Parameters!EndMonth.Value >= 2,
        ReportItems!txtTotal3.Value, Nothing
        ) OR
    
     iif(
        Parameters!StartMonth.Value <= 3 AND Parameters!EndMonth.Value >= 3,
        ReportItems!txtTotal4.Value, Nothing
        )
    
    0 讨论(0)
提交回复
热议问题