locked
indicator expression RRS feed

  • Question

  • hi

       i create report in SSRS. in that report i am having 2 columns in that report i want to compare 2 values and create indicator

    how to write compare expression in INDICATOR  there its shows only start value and end value..where to write this expression also

    Monday, May 21, 2012 8:01 AM

Answers

  • Hi There

    If you are using the SQL Server 2008 then you can add indicator and put expression in the incator for red and green condition

    I am putting screenshot for your help

    If you have any question please let me know.

    Many Thanks

    Syed Qazafi Anjum

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful

    --indicator exp

    =iif(Sum(Fields!Rev_Ytd_Actual_prevmonth.Value) < Sum(Fields! Rev_Ytd_Actual_Actualmonth.Value),"red","green").



    Monday, May 21, 2012 9:03 AM

All replies

  • Hi There

    If you are using the SQL Server 2008 then you can add indicator and put expression in the incator for red and green condition

    I am putting screenshot for your help

    If you have any question please let me know.

    Many Thanks

    Syed Qazafi Anjum

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful

    --indicator exp

    =iif(Sum(Fields!Rev_Ytd_Actual_prevmonth.Value) < Sum(Fields! Rev_Ytd_Actual_Actualmonth.Value),"red","green").



    Monday, May 21, 2012 9:03 AM
  • Ya thanks for ur reply... i got good result becoz of ur reply..but i have another one probelm in that indicator..

    i want to show only red indicator i dont want to show white indicator

    My expression:

    iif(Fields!BALANCE.Value > 100000,"Red",nothing)

    like this i gave but still i am getting that white indicator

    Monday, May 28, 2012 7:49 AM
  • Hi There

    Thanks for your posting. In this case you have to put the expression in the hidden property of that indicator like

    =iif(Fields!BALANCE.Value > 100000,false,true)

    If you have any question please let me know.

    Many Thanks

    Syed Qazafi Anjum

    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful


    Monday, May 28, 2012 8:10 AM
  • Ya i tried this... but what is main problem

    in this ...that Border also hide when i use that expression in that hide or show option

    Monday, May 28, 2012 1:04 PM
  • Hi Syed,

    I have a similar case in writing expression for indicators. But this is not in the body but in the report header.

    Yes the requirement is, there should be an indicator or image (jpeg) in the Report Header right hand side top corner. I need to write an expression such that the,

    1) difference between data refresh date and Current date is less than 2 then the color should be green

    2) difference between data refresh date and Current date is greater than 4 then the color should be red.

    Please help me out with the solution and let me know if any more information is needed. Thank you.

    Regards,

    Mani

    Sunday, December 30, 2012 6:03 AM
  • Got the answer for this solutuion.

    write a stored procedure to get the max(days) of difference between current date and data refresh date.

    Next: Right click on the image-->properties-->visibility-->show or hide based on expression and insert the below code.

    Green:

    = IIF(Sum(Fields!Column.Value, "Dataset")<=2,False,True)

    Red:

    = IIF(Sum(Fields!Column.Value, "Dataset")> 4,False,True)

    so based on the value of the expression i.e. if the number of days is less than 2 it is green and if the number of days is greater than 4 it is red.

    Regards,

    Mani

    • Proposed as answer by Mani.Patni Tuesday, February 5, 2013 9:27 AM
    Tuesday, February 5, 2013 9:27 AM