matrix border formatting craps out when cell value is Nothing -- pic included

  • Formula for the "Bottom" Border Color:

    =IIF(Fields!occ_period_id.Value = Parameters!spid.Value,"Red",

    IIF(Fields!show_date.Value = "Grand total" OR Fields!occ_period_id.Value = Parameters!spid.Value + 6, "Black",

    "LightGrey"))

    The formula for the value going into the cell is:

    =IIF(IsNumeric(Sum(Fields!occ_pct.Value)),Sum(Fields!occ_pct.Value),0)

    When the dataset brings NO records back for a particular cell, the border doesn't get shaded appropriately (see attached .png). It seems that the Fields!occ_period_id.Value is null in that case? How does one work around this?

    What else can I offer the forum on this point?

    THANKS!

  • i think it's an html thing, if you put a space or an html non-breaking space, i think you'll fix it:

    =" " & IIF(Fields!occ_period_id.Value = Parameters!spid.Value,"Red",IIF(Fields!show_date.Value = "Grand total" OR Fields!occ_period_id.Value = Parameters!spid.Value + 6, "Black","LightGrey"))

    ' or

    =" [amp]nbsp;" & IIF(Fields!occ_period_id.Value = Parameters!spid.Value,"Red",IIF(Fields!show_date.Value = "Grand total" OR Fields!occ_period_id.Value = Parameters!spid.Value + 6, "Black","LightGrey"))

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks, but no such luck Lowell. The report ignored all color border code when I put either of your ideas in place.

Viewing 3 posts - 1 through 2 (of 2 total)

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