3 Replies Latest reply on Feb 14, 2011 10:02 AM by philmodjunk

    Conditional Formatting a Sub Summary

    mgxdigital

      Title

      Conditional Formatting a Sub Summary

      Post

      Hello All,

      I'm wondering if it's possible to add conditional formatting to a sub summary based on what the sub summary is on.

      For instance, i have a report listed sorted by items and the qty of items that i have.

      I have a sub summary that includes a summary field to add the total qty of each item.

      I'd like to add conditional formatting to the summary field based on each item.

      ie...if type A item is lower than 50, turn red. 

      if type B item is lower than 45, turn red.

      if type C ite is lower than 125, turn red.

      Is there any way to do this?

      Thanks for the help!

        • 1. Re: Conditional Formatting a Sub Summary
          philmodjunk

          Yes this can be done, but you will need to refer to GetSummary instead of directly referring to the summary field in your conditional format expression.

          If your summary field is called sTotal, and your sub summary part is set to be visible, "When sorted by" Type, you'd use this expression to turn Type A items red when the sTotal sub total is < 50
          Get Summary ( sTotal ; Type ) < 50

          Of course this expression will cause Type B and C items to show red at sub totals < 50. You'd need to put these values in a related table so that you can refer to that field via a relationship instead of the literal value: 50, 45 or 125.

          Get Summary ( sTotal ; Type ) < RelatedTable::Field

          • 2. Re: Conditional Formatting a Sub Summary
            mgxdigital

            Thanks Phil.

            How do i set the type to each item?

            Get Summary (sTotal ; Type ) < RelaedTable: Qty Level

            How would it know what type? If type is "balloon" and the qty is less than 50...turn red.

            If type is "jacket" and the qty is less than 125...turn red.

            • 3. Re: Conditional Formatting a Sub Summary
              philmodjunk

              I assumed you had a field name "Type" that was the "sorted by" field for you Sub Summary part.

              Your related table would link by this same table:

              Type: "balloon", "Jacket", etc.
              WarningLevel: 50, 12 etc.

              A relationship linking the two tables:

              ReportLayoutTable::Type = WarningLevels::Type

              Then Your conditional fromat expression would be:

              Get Summary ( sTotal ; Type ) < WarningLevels::WarningLevel

              You may already have a table where you have one record for each "Type" where you can add this warning level field and use a relationship based on Type to it.