locked
Need to Hide Table Rows and Chart Series When a Series Contains all Zeros RRS feed

  • Question

  • I have a SQL Server 2008 R2 report that contains tables and charts. In the tables, the columns of data represent either days of the month, or months of the year.  The data in those columns is an integer value, and represents the value of a 'Key Indicator'. The series data will occupy two rows in the table, and will be either 'Actual' or 'Target'.

    For some of the Key Indicators, the 'Target' can return all zeros (an entire row of zeros). In the table, I would like to hide the row if all of the values for any series is zero. I would like to do the same for the charts. In a chart of course, all zeros result in a horizontal line on the zero axis.

    How can I hide the table row and chart series in these cases?

    Thank you for your help!

    cdun2

    Friday, July 6, 2012 8:14 PM

Answers

  • Hi There

    Thanks for your posting. You can put filter inside your tablix and your expression might look like this

    Expression =(Fields!Actual.Value> 0 or Fields!Target.Value >0)(boolean type)

    Operator  “=”

    Value= true

    If you would like to show only rows where you just have values in both column greater then zero then put condition and in your expression

    Expression =(Fields!Actual.Value> 0 and Fields!Target.Value >0)(boolean type)

    Operator  “=”

    Value= true

    Expression =(Fields!Actual.Value> 0 or Fields!Target.Value >0)(boolean type)
    Operator  “=”
    Value= true
    If you would like to show only rows where you just have values in both column greater then zero then put condition and in your expression
    Expression =(Fields!Actual.Value> 0 and Fields!Target.Value >0)(boolean type)
    Operator  “=”
    Value= true

    The similar approach you can use to put filter on chart series by right click on category group and apply filter on that

    I hope this will help

    I am putting screenshot for your help

    Many thanks

    Syed Qazafi Anjum

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



    • Proposed as answer by Edward Zhu Monday, July 9, 2012 3:04 AM
    • Edited by Syed Qazafi Anjum Monday, July 9, 2012 3:20 AM
    • Marked as answer by cdun2 Tuesday, July 10, 2012 5:58 PM
    Saturday, July 7, 2012 1:12 AM

All replies

  • Hi There

    Thanks for your posting. You can put filter inside your tablix and your expression might look like this

    Expression =(Fields!Actual.Value> 0 or Fields!Target.Value >0)(boolean type)

    Operator  “=”

    Value= true

    If you would like to show only rows where you just have values in both column greater then zero then put condition and in your expression

    Expression =(Fields!Actual.Value> 0 and Fields!Target.Value >0)(boolean type)

    Operator  “=”

    Value= true

    Expression =(Fields!Actual.Value> 0 or Fields!Target.Value >0)(boolean type)
    Operator  “=”
    Value= true
    If you would like to show only rows where you just have values in both column greater then zero then put condition and in your expression
    Expression =(Fields!Actual.Value> 0 and Fields!Target.Value >0)(boolean type)
    Operator  “=”
    Value= true

    The similar approach you can use to put filter on chart series by right click on category group and apply filter on that

    I hope this will help

    I am putting screenshot for your help

    Many thanks

    Syed Qazafi Anjum

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



    • Proposed as answer by Edward Zhu Monday, July 9, 2012 3:04 AM
    • Edited by Syed Qazafi Anjum Monday, July 9, 2012 3:20 AM
    • Marked as answer by cdun2 Tuesday, July 10, 2012 5:58 PM
    Saturday, July 7, 2012 1:12 AM
  • Thank you for your help.

    cdun2

    Tuesday, July 10, 2012 5:58 PM