1 Reply Latest reply on Dec 7, 2014 1:10 PM by philmodjunk

    Alternating formatting on subsummary report sections



      Alternating formatting on subsummary report sections


      There have been many (usually complicated) solutions to the problem of making a sequence of subsummary sections alternate in format (usually background fill). However the ones I found from googling were not particularly satisfactory, so I played around a bit and noticed a few interesting facts:

      1) You can use Let() in field custom formatting expressions to set a global.

      2) Custom formatting expressions get executed even if they don't actually have any format changes associated with them.

      3) The order of evaluation for fields seems to be what you'd expect, top->bottom, left->right.

      So what I did was put the following expression into the custom formatting of a header field (or any field that is at a point where I want to reset the alternation:

      Let ( $$UI_REPORT_FLAG = 0 ; 0) // reset alternation flag

      And then I stretched the leftmost field of the subsummary so that it spanned the width of the part, moved it to the back, and used custom formatting to set an alternate background, with the following expression:


      Works like a charm. Just posting it here so TNPB can find it.

        • 1. Re: Alternating formatting on subsummary report sections

          An alternative is to go into part set up and specify alternating colors for the Body. Since the number of body records grouped with a given sub summary part will vary, this works best if you select a third back ground color for the sub summary parts so it is not critical which back ground color shows in a given body part so long as it alternates. (Note, you'll want to clear the "delineate" option in layout setup in most cases.)