Conditional Borders for Empty Cells

  • I'm trying to show a top border for the first value in a group in a matrix. I'm using the code:

    =iif(Fields!MetricSort.Value = 1, "2pt", "1pt")

    The problem is that this doesn't work for empty cells. I get a line broken up by the empty cells. I already have a 0 in these cells using:

    =iif(isNothing(Sum(Fields!Count.Value)),0,Sum(Fields!Count.Value))

    But since there are no values to test on, is there a way to implement this border on an empty cell?

    Thanks,

    -Eric

  • So are you saying that when you have no value for Sum(Fields!Count.Value) you also have no value in Fields!MetricSort.Value? Can you post a sample dataset?

  • here's a little piece:

    2008-08-01 Individual1On Plan1Old Existing138917

    2008-09-01 Individual1On Plan1Old Existing135167

    2008-10-01 Individual1On Plan1Old Existing134210

    2008-11-01 Individual1On Plan1Old Existing129999

    2008-12-01 Individual1On Plan1Old Existing122971

    2009-01-01 Individual1On Plan1Old Existing122400

    The report starts with 2008-07-01 for most rows. So, for instance, there are no values for the 2008-07-01 column for the Individual/On Plan/Old Existing grouping. So there are no values to base a conditional property, as far as I can tell. Am I missing something or is there any other way to do it?

    Thanks.

  • Eric, if your answer to Jack's first question is Yes, it may be as simple as changing the condition as follows:

    =iif(Fields!MetricSort.Value = 1 Or IsNothing(Fields!MetricSort.Value), "2pt", "1pt")

  • Yes, I thought of this, but the problem is that there are many cells with no value. That statement will show a border for all of them, even if they are not in a row where the value in question is 1.

    I guess the question is, is there a way to isolate a particular cell in a matrix with no data?

    But also, what I'm ultimately trying to accomplish here is separating groups with a line. Is there another way to do this where I can avoid this problem altogether?

  • Yes, you can apply a border property to a whole matrix group by first selecting the group in the designer. But if you've got more than one group, you may have to add them as new groups in the matrix properties, which in turn may require the addition of that group level in your data query.

  • Try this then:

    =iif(Fields!MetricSort.Value = 1 Or Fields!MetricSort.Value = 1 AND IsNothing(Fields!MetricSort.Value), "2pt", "1pt")

  • Thanks for your replies. I ended up creating a template table with all possible grouping values and joining it to my data so each data combo (ie, matrix cell) will have data (a 0 where there was none).

  • Forum Newbie

    I am having the same problem and would like to hear in more detail, how you were able to populate every matrix cell. How did you build your template? Was it done dynamically?

    Thanks.

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

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