Toggle visibility of textbox in footer if condition is true in body of report?

  • In the body of the report are statistical details about a given set of performances. For example, suppose the report has a single table with three rows, where column A displays "Minimum Required" and Column B displays "Actual".

    If any row in this table has a situation where "Actual" is less than "Minimum Required", I'd like to display a message in the footer of the report that displays "Insufficient data found".

    Is there a way to do this, even if it's in custom code? I've been toying with the idea of creating a running sum value by creating an additional column in the table that evaluates something like =iif(Actual<MinumimRequired,1,0). Then the in the footer test if the running value is above 0; if it is greater than 0, then at least one of the situations has insufficient data. I just can't seem to figure out how to develop this, however.

    Thanks in advance,

    Pete

  • Hi

    If my understanding is correct, you can just merge the two cells of the footer and can give the below expression.

    =IIF(Fields!ACTUAL.Value < Fields!MINIMUM.Value,"INSUFFICAINT DATA FOUND","")

    No need of adding third column. Please let me know if my understanding is not correct.

    Regards,

    MC

    Thanks & Regards,
    MC

  • Pete,

    I think the method you mention is the way to go. One thing to keep in mind is that you don't need to add a column tot he table, you can add a calculated field to the dataset using the formula you mention, then in the hidden property of the textbox in the footer you can do:

    =IIF(Sum(Fields!calculated_field.Value) > 0, False, True)

  • Jack, I figured I'd find a reply from you at some point -- seen you helping others with SSRS quite a bit - very cool.

    Actually, I was able to implement my idea, successfully, but I like your idea more. I definitely prefer solutions that leverage datasets (SQL queries) rather than building out objects in the report layout. I'll give your suggestion a try; should work nicely.

    Thanks again for the help.

    --Pete

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

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