locked
Pie Chart Help - skip null values? RRS feed

  • Question

  • Hello All,

      I have a PieChart on my form which graphs "Lesion Codes".  The problem is that sometimes the "Lesion Code" is going to be blank.  I dont want the PieChart to graph the blank codes, but it is... labeling them as "Category 1". 

    The expressions are as follows:


    Series Label: =(iif(Fields!LesionCode.Value <> "", Fields!LesionCode.Value, Nothing))
    Value:=Count(iif(Fields!LesionCode.Value <> "", 1, Nothing))

    I also tried:

    Series Label: =(iif(Fields!LesionCode.Value <> nothing, Fields!LesionCode.Value, Nothing))
    Value:=Count(iif(Fields!LesionCode.Value <> nothing, 1, Nothing))


    what am I doing wrong?  How to I get it to ignore and blank LesionCodes and not graph them?
    Monday, October 13, 2008 5:00 PM

All replies

  • anyone?  I have been trying to get this fixed for nearly a week!  I dont understand what I am doing wrong!?!
    Tuesday, October 14, 2008 4:44 PM
  • $#)%(#$^)*$


    I forgot the .ToString!!  sometimes its the simplest things you jsut completely overlook!
    • Marked as answer by DigitalFusion Tuesday, October 14, 2008 6:35 PM
    • Marked as answer by DigitalFusion Tuesday, October 14, 2008 6:35 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:14 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:15 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:21 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:21 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:21 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:21 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:21 PM
    • Unmarked as answer by DigitalFusion Tuesday, October 14, 2008 7:21 PM
    Tuesday, October 14, 2008 6:05 PM
  • ok, well it works with .ToString for the LesionCode graphing.  However, I have another report which graphs "HoofZones". 

    Series Label: =(iif(Fields!HoofZone.Value.ToString <> "", Fields!HoofZone.Value.ToString, Nothing))
    Value: =Count(iif(Fields!HoofZone.Value.ToString <> "", 1, Nothing))

    It doesnt graph any blank "HoofZone"s, it does however add a label called "category 1" with the above settings.


    I dont understand why it works for the lesions, but not the zones?????????????


    Tuesday, October 14, 2008 7:19 PM
  • what I can I do to troubleshoot this?  Wouldnt a null value in the DB for HoofZone convert to "" when used with .ToString?  
    Wednesday, October 15, 2008 4:47 PM
  • I also tried this for the series label expression:

    =(iif(Fields!HoofZone.Value.ToString <> "", (iif(Fields!HoofZone.Value <> nothing, Fields!HoofZone.Value.ToString, Nothing)), Nothing))

    and it still has "Category 1" on the PieChart legend.  Its not graphing it, but it is adding the label. 

    the Value expression of:

    =Count(iif(Fields!HoofZone.Value.ToString <> "", 1, Nothing))

    works to keep the chart from graphing the number of null/blank values, but it wont work for the legend/series labels????????????  So confused and frustrated right now!!!!!!





    p l e a s e... any one out there have any suggestions?  Anything at all?  I am at my whits end here! 
    Wednesday, October 15, 2008 4:52 PM